mirror of
https://github.com/laurent22/joplin.git
synced 2026-10-25 02:47:28 +00:00
All: Fixes #13008: Importing MD + frontmatter fails on empty variable
This commit is contained in:
1 parent
7dae90c9f3
commit
d551963669
4 files changed
+22
-3
No files matched your search
@@ -240,8 +240,10 @@ export const parse = (note: string): ParsedMeta => {
|
||||
if ('tags' in md) {
|
||||
// Only create unique tags
|
||||
tags = md['tags'];
|
||||
} else if ('keywords' in md) {
|
||||
// Adding support for r-markdown/pandoc
|
||||
} else if ('keywords' in md && Array.isArray(md.keywords)) {
|
||||
// Support for r-markdown/pandoc. Note that "keywords" may be an empty field in the input
|
||||
// document, which would be parsed as just "null", so this is why we need to check that it
|
||||
// is an array. Fixes: https://github.com/laurent22/joplin/issues/13008
|
||||
tags = tags.concat(md['keywords']);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user