!207 修改备忘录出现的jscrash

Merge pull request !207 from nobbo/master
This commit is contained in:
openharmony_ci 2023-05-22 08:06:48 +00:00 committed by Gitee
commit 7e385227e5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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]
}
/**