Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fungairino committed Apr 27, 2024
1 parent 0c94e51 commit 0832c12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/store/sidebar/thunks/removeFormPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ const removeFormPanel = createAsyncThunk<
return;
}

await closeForms([nonce]);
// Trigger form close for the mod only if it's not already unavailable,
// since forms won't exist on the form controller after the page navigation
if (!removedEntry.isUnavailable) {
await closeForms([nonce]);
}

return {
removedEntry,
Expand Down
5 changes: 4 additions & 1 deletion src/types/sidebarTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ type BasePanelEntry = {

/**
* Determines if the panel cannot be displayed for the current tab. Used
* to show an overlay over the panel to indicate it is unavailable.
* to show an overlay over the panel to indicate it is unavailable. Added this
* field to account for MV3 side panel that persists across page navigation
*
* @since 1.8.14
*/
isUnavailable?: boolean;
};
Expand Down

0 comments on commit 0832c12

Please sign in to comment.