Skip to content

Commit c8cb5f5

Browse files
committed
move check to for loop
1 parent a51e7b0 commit c8cb5f5

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

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

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

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;
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);
658655
}
656+
break;
659657
}
660658

661659

0 commit comments

Comments
 (0)