Skip to content

Commit

Permalink
Fix a bug with ActionFrame failsafe grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
KazWolfe committed Dec 28, 2022
1 parent be20b30 commit bab8f89
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions SDPlugin/src/inspector/frames/ActionFrame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,14 @@ export class ActionFrame extends BaseFrame<ActionButtonSettings> {
failsafe.selected = true;

if (cachedAction?.category != null) {
let parent = document.createElement("optgroup");
parent.label = StringUtils.toTitleCase(cachedAction.category);
placeholder.after(parent);
let parent = groupCache.get(cachedAction.category);
if (parent == null) {
parent = document.createElement("optgroup");
parent.label = StringUtils.toTitleCase(cachedAction.category);
placeholder.after(parent);
}

parent.append(failsafe);
parent.prepend(failsafe);
} else {
placeholder.after(failsafe);
}
Expand Down

0 comments on commit bab8f89

Please sign in to comment.