From b4c78e387585fd2f5ff7b86f9f0bb6788a7fe1af Mon Sep 17 00:00:00 2001 From: l00827650 Date: Thu, 25 May 2023 12:50:11 +0800 Subject: [PATCH] fix: verify path condition not null Closes: I788EM Signed-off-by: l00827650 --- compiler/src/ets_checker.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/src/ets_checker.ts b/compiler/src/ets_checker.ts index c99a90aa4..78fa59a96 100644 --- a/compiler/src/ets_checker.ts +++ b/compiler/src/ets_checker.ts @@ -161,7 +161,8 @@ function getInitCheckConfig(tagName: string, message: string): InitCheckConfig { function getCheckJSDocTagNameConfig(fileName: string, sourceFileName: string): CheckJSDocTagNameConfig { let needCheckResult: boolean = false; const checkConfigArray: InitCheckConfig[] = []; - if (ohosSystemModulePaths.includes(path.normalize(sourceFileName)) || isArkuiDependence(sourceFileName)) { + if (sourceFileName && ohosSystemModulePaths.includes(path.normalize(sourceFileName)) || + isArkuiDependence(sourceFileName)) { if (isArkuiDependence(sourceFileName) && isCardFile(fileName)) { needCheckResult = true; checkConfigArray.push(getInitCheckConfig('form', "'{0}' can't support form application.")); -- Gitee