Use Object.entries instead of Object.keys
This commit is contained in:
parent
37eec09b9b
commit
eb22e7f462
@ -21,7 +21,7 @@ const withLoadMore = ({
|
||||
on: this.$listeners,
|
||||
scopedSlots: this.$scopedSlots
|
||||
}
|
||||
const children = Object.keys(this.$slots).map(slot => createElement('template', { slot }, this.$slots[slot]))
|
||||
const children = Object.entries(this.$slots).map(([key, value]) => createElement('template', { slot: key }, value))
|
||||
return (
|
||||
<div class="with-load-more">
|
||||
<WrappedComponent {...props}>
|
||||
|
@ -27,7 +27,7 @@ const withSubscription = ({
|
||||
on: this.$listeners,
|
||||
scopedSlots: this.$scopedSlots
|
||||
}
|
||||
const children = Object.keys(this.$slots).map(slot => createElement('template', { slot }, this.$slots[slot]))
|
||||
const children = Object.entries(this.$slots).map(([key, value]) => createElement('template', { slot: key }, value))
|
||||
return (
|
||||
<div class="with-subscription">
|
||||
<WrappedComponent {...props}>
|
||||
|
Loading…
Reference in New Issue
Block a user