Use Object.entries instead of Object.keys
This commit is contained in:
parent
37eec09b9b
commit
eb22e7f462
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue