fix: Suppress event before guard clauses in Templatize action (#13256)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tom Moor
2026-08-02 12:07:50 +00:00
committed by GitHub
co-authored by Claude Opus 5
parent b1b3db3430
commit 36b05130b6
+2 -2
View File
@@ -1219,6 +1219,8 @@ export const createTemplateFromDocument = createAction({
);
},
perform: ({ activeDocumentId, stores, t, event }) => {
event?.preventDefault();
event?.stopPropagation();
if (!activeDocumentId) {
return;
}
@@ -1226,8 +1228,6 @@ export const createTemplateFromDocument = createAction({
if (!document) {
return;
}
event?.preventDefault();
event?.stopPropagation();
stores.dialogs.openModal({
title: <DialogTitle title={t("Create template")} model={document} />,
content: <DocumentTemplatizeDialog documentId={activeDocumentId} />,