Skip to content

Commit

Permalink
๐Ÿšธ Accept array of keywords in ISCN json mode (#11)
Browse files Browse the repository at this point in the history
* ๐Ÿšธ Accept array of keywords in ISCN json mode

* ๐ŸŽจ Improve keywords array code style

Co-authored-by: Ng Wing Tat, David <[email protected]>

---------

Co-authored-by: Ng Wing Tat, David <[email protected]>
  • Loading branch information
williamchong and nwingt authored Apr 19, 2023
1 parent 5a18252 commit e3d1fc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pages/edit/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ export default {
} = JSON.parse(this.rawJSON)
this.contentMetadata = {
...contentMetadata,
keywords: contentMetadata.keywords.split(',').filter(k => !!k),
keywords: (
Array.isArray(contentMetadata.keywords)
? contentMetadata.keywords
: contentMetadata.keywords.split(',')
).filter(k => !!k),
sameAs: contentMetadata.sameAs.filter(s => !!s),
}
this.contentFingerprints = contentFingerprints
Expand Down

0 comments on commit e3d1fc7

Please sign in to comment.