mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
move check to for loop
This commit is contained in:
parent
a51e7b07c6
commit
c8cb5f5feb
|
@ -645,17 +645,15 @@ function actionOverflowHelper(initialPrimaryActions: IActionModel[], initialSeco
|
|||
}
|
||||
}
|
||||
|
||||
if (renderActions.length) {
|
||||
for (let i = (renderActions.length - 1); i !== 0; i--) {
|
||||
const temp = renderActions[i];
|
||||
if (temp.size === 0) {
|
||||
continue;
|
||||
}
|
||||
if (temp.action instanceof Separator) {
|
||||
renderActions.splice(i, 1);
|
||||
}
|
||||
break;
|
||||
for (let i = (renderActions.length - 1); i > 0; i--) {
|
||||
const temp = renderActions[i];
|
||||
if (temp.size === 0) {
|
||||
continue;
|
||||
}
|
||||
if (temp.action instanceof Separator) {
|
||||
renderActions.splice(i, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue