Skip to content

Commit 3ee8e7b

Browse files
committed
fix(server): note type not changed for webview template (closes #7557)
1 parent 0d0448d commit 3ee8e7b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/server/src/services/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ eventService.subscribe(eventService.ENTITY_CREATED, ({ entityName, entity }) =>
102102
const content = note.getContent();
103103

104104
if (
105-
["text", "code", "mermaid", "canvas", "relationMap", "mindMap"].includes(note.type) &&
105+
["text", "code", "mermaid", "canvas", "relationMap", "mindMap", "webView"].includes(note.type) &&
106106
typeof content === "string" &&
107107
// if the note has already content we're not going to overwrite it with template's one
108108
(!content || content.trim().length === 0) &&

apps/server/src/services/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export function getContentDisposition(filename: string) {
131131
}
132132

133133
// render and book are string note in the sense that they are expected to contain empty string
134-
const STRING_NOTE_TYPES = new Set(["text", "code", "relationMap", "search", "render", "book", "mermaid", "canvas"]);
134+
const STRING_NOTE_TYPES = new Set(["text", "code", "relationMap", "search", "render", "book", "mermaid", "canvas", "webView"]);
135135
const STRING_MIME_TYPES = new Set(["application/javascript", "application/x-javascript", "application/json", "application/x-sql", "image/svg+xml"]);
136136

137137
export function isStringNote(type: string | undefined, mime: string) {

0 commit comments

Comments
 (0)