Skip to content

Commit a51e7b0

Browse files
committed
check if no rendered actions
1 parent b114662 commit a51e7b0

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -645,15 +645,17 @@ function actionOverflowHelper(initialPrimaryActions: IActionModel[], initialSeco
645645
}
646646
}
647647

648-
for (let i = (renderActions.length - 1); i !== 0; i--) {
649-
const temp = renderActions[i];
650-
if (temp.size === 0) {
651-
continue;
652-
}
653-
if (temp.action instanceof Separator) {
654-
renderActions.splice(i, 1);
648+
if (renderActions.length) {
649+
for (let i = (renderActions.length - 1); i !== 0; i--) {
650+
const temp = renderActions[i];
651+
if (temp.size === 0) {
652+
continue;
653+
}
654+
if (temp.action instanceof Separator) {
655+
renderActions.splice(i, 1);
656+
}
657+
break;
655658
}
656-
break;
657659
}
658660

659661

0 commit comments

Comments
 (0)