From eb22e7f462fb69b77278b5f8ad9cb900d2f9e0d9 Mon Sep 17 00:00:00 2001 From: taehoon Date: Wed, 20 Feb 2019 21:50:10 -0500 Subject: [PATCH] Use Object.entries instead of Object.keys --- src/hocs/with_load_more/with_load_more.js | 2 +- 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 (
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 (