Don't add unnecessary separator to OE action menu (#7071)

* Don't add unnecessary separator to OE action menu

* Fix another check
This commit is contained in:
Charles Gagnon
2019-09-05 09:22:53 -07:00
committed by Karl Burtram
parent cbbd4ffbb6
commit b1f29a8c92

View File

@@ -106,12 +106,12 @@ export class ServerTreeActionProvider extends ContributableActionProvider {
fillInActions(groups, actions, false);
if (insertIndex) {
if (!(actions[insertIndex] instanceof Separator)) {
if (!(actions[insertIndex] instanceof Separator) && builtIn.length > 0) {
builtIn.unshift(new Separator());
}
actions.splice(insertIndex, 0, ...builtIn);
} else {
if (actions.length > 0) {
if (actions.length > 0 && builtIn.length > 0) {
builtIn.push(new Separator());
}
actions.unshift(...builtIn);