From f9fedd2a394c6e87249e54331d895b5100e09b34 Mon Sep 17 00:00:00 2001 From: William Chong Date: Tue, 22 Mar 2022 14:24:56 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=85=20Guard=20invalid=20tags=20in=20is?= =?UTF-8?q?cn-ar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/in/widget/iscn-ar/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/in/widget/iscn-ar/index.vue b/pages/in/widget/iscn-ar/index.vue index a2b16ea14..88ede820d 100644 --- a/pages/in/widget/iscn-ar/index.vue +++ b/pages/in/widget/iscn-ar/index.vue @@ -474,7 +474,6 @@ export default { async onReceiveISCNData(data) { const { fingerprints = [], - tags = [], url, publisher, author, @@ -485,6 +484,7 @@ export default { license, type, name, + tags = [], } = data; type = type || 'article'; if (publisher) { @@ -503,6 +503,12 @@ export default { if (name) { name = name.substring(0, 255); } + if (!tags) { + tags = []; + } else if (typeof tags === 'string') { + tags = tags.split(','); + } + const ISCNData = { fingerprints, name,