mirror of
https://github.com/openharmony/tools_previewer.git
synced 2026-07-19 14:23:32 -04:00
Fixed string parsing failure caused by line breaks
Signed-off-by: sambaby <1337922982@qq.com>
This commit is contained in:
@@ -243,7 +243,10 @@ export function getTheRealReferenceFromImport(sourceFile: SourceFile, typeName:
|
||||
const importElements = importElementEntity[i].importElements.replace('{', '').replace('}', '').split(',');
|
||||
for (let j = 0; j < importElements.length; j++) {
|
||||
const element = importElements[j].trimStart().trimEnd();
|
||||
if (`_${typeName}` === element.split('as')[1].trimStart().trimEnd()) {
|
||||
if (!element) {
|
||||
continue;
|
||||
}
|
||||
if (`_${typeName}` === element.split('as')[1].trim()) {
|
||||
return `_${typeName}`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user