diff --git a/manifest.json b/manifest.json index 64dcf59..41a30a0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-admonition", "name": "Admonition", - "version": "5.0.2", + "version": "5.0.3", "minAppVersion": "0.11.0", "description": "Admonition block-styled content for Obsidian.md", "author": "Jeremy Valentine", diff --git a/package.json b/package.json index 40c2098..642201b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-admonition", - "version": "5.0.2", + "version": "5.0.3", "description": "Admonition block-styled content for Obsidian.md", "main": "main.js", "scripts": { diff --git a/src/util/util.ts b/src/util/util.ts index 76f2a85..f777be9 100644 --- a/src/util/util.ts +++ b/src/util/util.ts @@ -79,8 +79,7 @@ export function getParametersFromSource(type: string, src: string) { * If the admonition should collapse, but something other than open or closed was provided, set to closed. */ if ( - collapse && - collapse.length && + collapse !== undefined && collapse !== "none" && collapse !== "open" && collapse !== "closed" @@ -91,12 +90,7 @@ export function getParametersFromSource(type: string, src: string) { /** * If the admonition should collapse, but title was blanked, set the default title. */ - if ( - title.trim() === "" && - collapse && - collapse.length && - collapse !== "none" - ) { + if (title.trim() === "" && collapse !== undefined && collapse !== "none") { title = type[0].toUpperCase() + type.slice(1).toLowerCase(); new Notice("An admonition must have a title if it is collapsible."); } diff --git a/versions.json b/versions.json index 42c7cd4..c9ec734 100644 --- a/versions.json +++ b/versions.json @@ -10,5 +10,5 @@ "4.2.1": "0.11.0", "4.3.1": "0.12.0", "4.4.2": "0.12.2", - "5.0.2": "0.12.2" + "5.0.3": "0.12.2" } \ No newline at end of file