DEV: removes _.toArray from codebase (#6654)

DEV: removes _.toArray from codebase (#6654)

From e47b478b83afa322723c9b99be263ea3b873816b Mon Sep 17 00:00:00 2001
From: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Date: Mon, 26 Nov 2018 11:15:05 +0100
Subject: [PATCH] DEV: removes _.toArray from codebase (#6654)


diff --git a/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6
index 66f7276..78a98c5 100644
--- a/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-customize-themes-show.js.es6
@@ -131,8 +131,8 @@ export default Ember.Controller.extend({
         });
 
         this.get("parentController.model.content").forEach(theme => {
-          const children = _.toArray(theme.get("childThemes"));
-          const rawChildren = _.toArray(theme.get("child_themes") || []);
+          const children = Ember.makeArray(theme.get("childThemes"));
+          const rawChildren = Ember.makeArray(theme.get("child_themes"));
           const index = children ? children.indexOf(model) : -1;
           if (index > -1) {
             children.splice(index, 1);

GitHub

1 Like