From 63ab0eacff596c207e97525d624f1c28963e186f Mon Sep 17 00:00:00 2001 From: David Date: Wed, 16 Aug 2017 12:30:40 +0300 Subject: [PATCH] Allow 1-deep nested arrays of Scenes to support structured configuration for larger projects (#2241) * Allow 1-deep nested arrays of Scenes to support structured configuration for larger projects * updated dist-version of the changed source --- dist/navigationStore.js | 3 ++- src/navigationStore.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/navigationStore.js b/dist/navigationStore.js index 0255686b6..fec7ce95e 100644 --- a/dist/navigationStore.js +++ b/dist/navigationStore.js @@ -290,7 +290,8 @@ if(drawer){ commonProps.drawerImage=commonProps.drawerImage||_menu_burger2.default; } -var children=!Array.isArray(parentProps.children)?[parentProps.children]:[].concat(_toConsumableArray(parentProps.children)); + +var children=!Array.isArray(parentProps.children)?[parentProps.children]:[].concat.apply([],parentProps.children); if(!drawer&&!tabs){ children.push.apply(children,_toConsumableArray(clones)); diff --git a/src/navigationStore.js b/src/navigationStore.js index a13c0c582..c9681767b 100644 --- a/src/navigationStore.js +++ b/src/navigationStore.js @@ -290,7 +290,8 @@ class NavigationStore { commonProps.drawerImage = commonProps.drawerImage || _drawerImage; } - const children = !Array.isArray(parentProps.children) ? [parentProps.children] : [...parentProps.children]; + // allow 1-deep nested arrays of Scenes to support structured configuration for larger projects + const children = !Array.isArray(parentProps.children) ? [parentProps.children] : [].concat.apply([], parentProps.children); // add clone scenes if (!drawer && !tabs) { children.push(...clones);