diff --git a/apps/comments/src/comments-activity-tab.ts b/apps/comments/src/comments-activity-tab.ts index b738242cf574c..44ec58972c0d9 100644 --- a/apps/comments/src/comments-activity-tab.ts +++ b/apps/comments/src/comments-activity-tab.ts @@ -15,7 +15,7 @@ import { getComments } from './services/GetComments.ts' * Register the comments plugins for the Activity sidebar */ export function registerCommentsPlugins() { - let app: App + let app: App | undefined window.OCA.Activity.registerSidebarAction({ mount: async (el: HTMLElement, { node, reload }: { node: INode, reload: () => void }) => { @@ -38,6 +38,7 @@ export function registerCommentsPlugins() { unmount: () => { // destroy previous instance if available app?.unmount() + app = undefined }, })