Makes IContextMenuItem.content optional because, I guess it is? Fixes #310

This commit is contained in:
rgthree
2024-08-28 20:53:49 -04:00
parent 17df78ec03
commit bbcd1a73ad
9 changed files with 16 additions and 15 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ function showQueueGroupNodesMenuIfGroupIsSelected(existingOptions: ContextMenuIt
disabled: !outputNodes?.length,
};
let idx = existingOptions.findIndex((o) => o?.content.startsWith("Queue Selected ")) + 1;
let idx = existingOptions.findIndex((o) => o?.content?.startsWith("Queue Selected ")) + 1;
idx = idx || existingOptions.findIndex((o) => o?.content === "Outputs") + 1;
idx = idx || existingOptions.findIndex((o) => o?.content === "Align") + 1;
idx = idx || 3;