mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
refactor(server): convert to switch
This commit is contained in:
parent
1b1f1957c3
commit
dd18866156
@ -656,12 +656,13 @@ export function readZipFile(buffer: Buffer, processEntryCallback: (zipfile: yauz
|
|||||||
|
|
||||||
function resolveNoteType(type: string | undefined): NoteType {
|
function resolveNoteType(type: string | undefined): NoteType {
|
||||||
// BC for ZIPs created in Trilium 0.57 and older
|
// BC for ZIPs created in Trilium 0.57 and older
|
||||||
if (type === "relation-map") {
|
switch (type) {
|
||||||
return "relationMap";
|
case "relation-map":
|
||||||
} else if (type === "note-map") {
|
return "relationMap";
|
||||||
return "noteMap";
|
case "note-map":
|
||||||
} else if (type === "web-view") {
|
return "noteMap";
|
||||||
return "webView";
|
case "web-view":
|
||||||
|
return "webView";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type && (ALLOWED_NOTE_TYPES as readonly string[]).includes(type)) {
|
if (type && (ALLOWED_NOTE_TYPES as readonly string[]).includes(type)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user