From f8873ccbac6c677e778c5064b9de04fa9aea16cd Mon Sep 17 00:00:00 2001 From: nobbo Date: Mon, 22 May 2023 14:31:56 +0800 Subject: [PATCH] =?UTF-8?q?fixed=204d55dd0=20from=20https://gitee.com/wang?= =?UTF-8?q?zhiyusss/applications=5Fnotes/pulls/207=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=A4=87=E5=BF=98=E5=BD=95=E5=87=BA=E7=8E=B0=E7=9A=84jscrash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nobbo --- .../src/main/ets/default/baseUtil/FolderUtil.ets | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/common/utils/src/main/ets/default/baseUtil/FolderUtil.ets b/common/utils/src/main/ets/default/baseUtil/FolderUtil.ets index 0423265..ab9190b 100644 --- a/common/utils/src/main/ets/default/baseUtil/FolderUtil.ets +++ b/common/utils/src/main/ets/default/baseUtil/FolderUtil.ets @@ -120,13 +120,16 @@ export class FolderUtil { * @return string | Resource - folder text */ getFolderText(folderData: FolderData): string | Resource { - if (folderData && folderData.uuid) { - LogUtil.info(TAG, "folderData.uuid " + folderData.uuid + " folderData.folder_type " + folderData.folder_type) - return folderData.folder_type == FolderType.CusDef ? folderData.name : folderTextMap[folderData.uuid] - } else { - folderData.uuid = ''; + if (folderData === undefined || folderData === null) { LogUtil.info(TAG, "folderData undefined") + return '' + } + if (folderData.uuid === undefined || folderData.uuid === null) { + LogUtil.info(TAG, "folderData uuid undefined") + folderData.uuid = 'sys_def_unClassified_uuid'; } + LogUtil.info(TAG, "folderData.uuid " + folderData.uuid + " folderData.folder_type " + folderData.folder_type) + return folderData.folder_type == FolderType.CusDef ? folderData.name : folderTextMap[folderData.uuid] } /** -- Gitee