diff --git a/packages/frontend/src/scripts/get-embed-code.ts b/packages/frontend/src/scripts/get-embed-code.ts index 9ab4e3d17b..c66deb9cc7 100644 --- a/packages/frontend/src/scripts/get-embed-code.ts +++ b/packages/frontend/src/scripts/get-embed-code.ts @@ -76,10 +76,12 @@ export function copyEmbedCode(entity: EmbeddableEntity, idOrUsername: string, pa copy(getEmbedCode(`/embed/${entity}/${_idOrUsername}`, _params)); os.success(); } else { - os.popup(MkEmbedCodeGenDialog, { + const { dispose } = os.popup(MkEmbedCodeGenDialog, { entity, idOrUsername, params: _params, - }, {}, 'closed'); + }, { + closed: () => dispose(), + }); } }