From 8139a2145083688aa78405e269407fa989d1c359 Mon Sep 17 00:00:00 2001 From: Mara Date: Sat, 11 May 2024 16:53:13 +0200 Subject: [PATCH] fix: change type to behavior to correspond with settings --- src/utils/parse_frontmatter.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/parse_frontmatter.ts b/src/utils/parse_frontmatter.ts index 2d019e09..c85df93b 100644 --- a/src/utils/parse_frontmatter.ts +++ b/src/utils/parse_frontmatter.ts @@ -365,12 +365,11 @@ export function parsePath( if (type.match(/^(fixed|obsidian|yaml)$/i)) return type as FolderSettings; return settings.upload.behavior; }; - for (const repo of properties) { const smartKey = repository ? repository.smartKey : "default"; const path: Path = { - type: matchType(frontmatter?.type), + type: matchType(frontmatter?.behavior), defaultName: frontmatter?.defaultName ?? settings.upload.defaultName, rootFolder: frontmatter?.rootFolder ?? settings.upload.rootFolder, category: { @@ -400,7 +399,7 @@ export function parsePath( if (frontmatter?.[`${smartKey}.defaultName`]) { path.defaultName = splitArrayPath(frontmatter[`${smartKey}.defaultName`]) as string; } - if (frontmatter?.[`${smartKey}.type`]) { + if (frontmatter?.[`${smartKey}.behavior`]) { path.type = matchType(frontmatter[`${smartKey}.type`].toLowerCase()); } if (frontmatter?.[`${smartKey}.attachment`]) {