mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
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:
committed by
Karl Burtram
parent
cbbd4ffbb6
commit
b1f29a8c92
@@ -106,12 +106,12 @@ export class ServerTreeActionProvider extends ContributableActionProvider {
|
|||||||
fillInActions(groups, actions, false);
|
fillInActions(groups, actions, false);
|
||||||
|
|
||||||
if (insertIndex) {
|
if (insertIndex) {
|
||||||
if (!(actions[insertIndex] instanceof Separator)) {
|
if (!(actions[insertIndex] instanceof Separator) && builtIn.length > 0) {
|
||||||
builtIn.unshift(new Separator());
|
builtIn.unshift(new Separator());
|
||||||
}
|
}
|
||||||
actions.splice(insertIndex, 0, ...builtIn);
|
actions.splice(insertIndex, 0, ...builtIn);
|
||||||
} else {
|
} else {
|
||||||
if (actions.length > 0) {
|
if (actions.length > 0 && builtIn.length > 0) {
|
||||||
builtIn.push(new Separator());
|
builtIn.push(new Separator());
|
||||||
}
|
}
|
||||||
actions.unshift(...builtIn);
|
actions.unshift(...builtIn);
|
||||||
|
|||||||
Reference in New Issue
Block a user