From 6c86ea5d78b860de653468a34ba1b56f25a4ade4 Mon Sep 17 00:00:00 2001 From: PJ Date: Tue, 19 Sep 2023 01:27:38 -0400 Subject: [PATCH] Fix #51 - Error if non-strings in frontmatter tags --- manifest.json | 2 +- src/Tag.js | 2 +- versions.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index f9f4714..af77857 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "Tag Wrangler", "author": "PJ Eby", "authorUrl": "https://github.com/pjeby", - "version": "0.5.12", + "version": "0.5.13", "minAppVersion": "1.2.8", "description": "Rename, merge, toggle, and search tags from the tag pane", "isDesktopOnly": false diff --git a/src/Tag.js b/src/Tag.js index ed20143..ee78b2b 100644 --- a/src/Tag.js +++ b/src/Tag.js @@ -44,7 +44,7 @@ export class Replacement { return tags.map((t, i) => { if (skipOdd && (i & 1)) return t; // leave odd entries (separators) alone // Obsidian allows spaces as separators within array elements - if (!t) return t; + if (!t || typeof t !== "string") return t; // Skip non-tag parts if (isAlias) { if (!t.startsWith("#") || !Tag.isTag(t)) return t; diff --git a/versions.json b/versions.json index d81a2db..7883d3a 100644 --- a/versions.json +++ b/versions.json @@ -1,5 +1,5 @@ { - "0.5.12": "1.2.8", + "0.5.13": "1.2.8", "0.5.5": "0.15.9", "0.5.3": "0.14.5", "0.5.2": "0.13.19",