From 2706ba50dc009c38d5c8aa0a78f14b5263bc8097 Mon Sep 17 00:00:00 2001 From: karlis <2995621482@qq.com> Date: Wed, 5 Jul 2023 20:59:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86FileList=E8=B0=83?= =?UTF-8?q?=E7=94=A8undefined=E5=AF=B9=E8=B1=A1=E6=96=B9=E6=B3=95=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AicsKnowledgeBase/qml/component/FileList.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AicsKnowledgeBase/qml/component/FileList.qml b/AicsKnowledgeBase/qml/component/FileList.qml index ab662a5..8ca3732 100644 --- a/AicsKnowledgeBase/qml/component/FileList.qml +++ b/AicsKnowledgeBase/qml/component/FileList.qml @@ -151,8 +151,9 @@ Item { size: isDir ? 0 : model.size stars: isDir ? 0 : model.stars // split string to array - tags: isDir ? [] : model.tags.length === 0 ? [] : model.tags.split( - ",") + tags: isDir ? [] : model.tags === null + || model.tags === undefined + || model.tags === "" ? [] : model.tags.split(",") onTagClicked: { emit: search(tag) console.log(tag)