diff options
| author | taehoon <th.dev91@gmail.com> | 2019-02-20 21:50:10 -0500 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-02-20 21:50:10 -0500 |
| commit | eb22e7f462fb69b77278b5f8ad9cb900d2f9e0d9 (patch) | |
| tree | 6b6d84b32cb445a1908840e33f99cb6bc7154c53 | |
| parent | 37eec09b9b63ef494a075776234382a3da25773e (diff) | |
Use Object.entries instead of Object.keys
| -rw-r--r-- | src/hocs/with_load_more/with_load_more.js | 2 | ||||
| -rw-r--r-- | src/hocs/with_subscription/with_subscription.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/hocs/with_load_more/with_load_more.js b/src/hocs/with_load_more/with_load_more.js index e9265d2a..e862a39b 100644 --- a/src/hocs/with_load_more/with_load_more.js +++ b/src/hocs/with_load_more/with_load_more.js @@ -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}> diff --git a/src/hocs/with_subscription/with_subscription.js b/src/hocs/with_subscription/with_subscription.js index 42ede7be..1ac67cba 100644 --- a/src/hocs/with_subscription/with_subscription.js +++ b/src/hocs/with_subscription/with_subscription.js @@ -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}> |
