diff --git a/src/sql/workbench/parts/objectExplorer/browser/serverTreeActionProvider.ts b/src/sql/workbench/parts/objectExplorer/browser/serverTreeActionProvider.ts index 4aa7b8b3ce..6e201d84ee 100644 --- a/src/sql/workbench/parts/objectExplorer/browser/serverTreeActionProvider.ts +++ b/src/sql/workbench/parts/objectExplorer/browser/serverTreeActionProvider.ts @@ -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);