Skip to content

Commit

Permalink
Allow 1-deep nested arrays of Scenes to support structured configurat…
Browse files Browse the repository at this point in the history
…ion 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
  • Loading branch information
davojan authored and aksonov committed Aug 16, 2017
1 parent 3fbcd73 commit 63ab0ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/navigationStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 2 additions & 1 deletion src/navigationStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 63ab0ea

Please sign in to comment.