From b5f15491a0fa247d6a2a0fd778ac0cc1e1c281a7 Mon Sep 17 00:00:00 2001 From: llama <100429699+iamllama@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:18:57 +0800 Subject: [PATCH] carry over tags when refetching csv metadata (#3938) --- ts/routes/import-csv/lib.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ts/routes/import-csv/lib.ts b/ts/routes/import-csv/lib.ts index 8c1ff3783..45868d1af 100644 --- a/ts/routes/import-csv/lib.ts +++ b/ts/routes/import-csv/lib.ts @@ -99,6 +99,7 @@ export class ImportCsvState { const shouldRefetchMetadata = this.shouldRefetchMetadata(changed); if (shouldRefetchMetadata) { + const { globalTags, updatedTags } = changed; changed = await getCsvMetadata({ path: this.path, delimiter: changed.delimiter, @@ -106,6 +107,9 @@ export class ImportCsvState { deckId: getDeckId(changed) ?? undefined, isHtml: changed.isHtml, }); + // carry over tags + changed.globalTags = globalTags; + changed.updatedTags = updatedTags; } const globalNotetype = getGlobalNotetype(changed);