Use Object.entries instead of Object.keys

feature/mobile-improvements-2
taehoon 6 years ago
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…
Cancel
Save