From 651c97153ba90daaacc5facc56e20aec5cdb112e Mon Sep 17 00:00:00 2001
From: taehoon
Date: Tue, 26 Feb 2019 15:26:59 -0500
Subject: [PATCH] Use native filter function
---
src/hocs/with_load_more/with_load_more.js | 3 +--
src/hocs/with_subscription/with_subscription.js | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/hocs/with_load_more/with_load_more.js b/src/hocs/with_load_more/with_load_more.js
index b8246ec9..74979b87 100644
--- a/src/hocs/with_load_more/with_load_more.js
+++ b/src/hocs/with_load_more/with_load_more.js
@@ -1,5 +1,4 @@
import Vue from 'vue'
-import filter from 'lodash/filter'
import isEmpty from 'lodash/isEmpty'
import { getComponentProps } from '../../services/component_utils/component_utils'
import './with_load_more.scss'
@@ -12,7 +11,7 @@ const withLoadMore = ({
additionalPropNames = [] // additional prop name list of the wrapper component
}) => (WrappedComponent) => {
const originalProps = Object.keys(getComponentProps(WrappedComponent))
- const props = filter(originalProps, v => v !== childPropName).concat(additionalPropNames)
+ const props = originalProps.filter(v => v !== childPropName).concat(additionalPropNames)
return Vue.component('withLoadMore', {
render (createElement) {
diff --git a/src/hocs/with_subscription/with_subscription.js b/src/hocs/with_subscription/with_subscription.js
index 4d3ae811..679409cf 100644
--- a/src/hocs/with_subscription/with_subscription.js
+++ b/src/hocs/with_subscription/with_subscription.js
@@ -1,5 +1,4 @@
import Vue from 'vue'
-import filter from 'lodash/filter'
import isEmpty from 'lodash/isEmpty'
import { getComponentProps } from '../../services/component_utils/component_utils'
import './with_subscription.scss'
@@ -11,7 +10,7 @@ const withSubscription = ({
additionalPropNames = [] // additional prop name list of the wrapper component
}) => (WrappedComponent) => {
const originalProps = Object.keys(getComponentProps(WrappedComponent))
- const props = filter(originalProps, v => v !== childPropName).concat(additionalPropNames)
+ const props = originalProps.filter(v => v !== childPropName).concat(additionalPropNames)
return Vue.component('withSubscription', {
props: [