This commit is contained in:
Joao Moreno 2017-02-22 15:42:31 +01:00
parent c6fecc0dc4
commit 79966a87c6

View file

@ -53,11 +53,13 @@ export function fillInActions(menu: IMenu, context: any, target: IAction[] | { p
head.splice(sep, 0, ...actions.slice(pivot)); head.splice(sep, 0, ...actions.slice(pivot));
} else { } else {
if (Array.isArray<IAction>(target)) { const to = Array.isArray<IAction>(target) ? target : target.secondary;
target.push(new Separator(), ...actions);
} else { if (to.length > 0) {
target.secondary.push(new Separator(), ...actions); to.push(new Separator());
} }
to.push(...actions);
} }
} }
} }