Skip to content

Commit

Permalink
fix: change type to behavior to correspond with settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed May 11, 2024
1 parent 48fbcbb commit 8139a21
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/parse_frontmatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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`]) {
Expand Down

0 comments on commit 8139a21

Please sign in to comment.