mirror of
https://github.com/outline/outline.git
synced 2026-08-03 13:27:25 +03:00
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:
co-authored by
Claude Opus 5
parent
b1b3db3430
commit
36b05130b6
@@ -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} />,
|
||||
|
||||
Reference in New Issue
Block a user