check if no rendered actions

This commit is contained in:
aamunger 2023-06-28 12:57:33 -07:00
parent b114662b7a
commit a51e7b07c6
No known key found for this signature in database
GPG key ID: F2CA0C6303FC6B74

View file

@ -645,15 +645,17 @@ function actionOverflowHelper(initialPrimaryActions: IActionModel[], initialSeco
}
}
for (let i = (renderActions.length - 1); i !== 0; i--) {
const temp = renderActions[i];
if (temp.size === 0) {
continue;
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;
}
if (temp.action instanceof Separator) {
renderActions.splice(i, 1);
}
break;
}