Bugfix: fixed init localStorageLink variable

Signed-off-by: laibo102 <laibo2@huawei.com>
Change-Id: I828b3dd1b3a64d0d69895989e9437f39fc10281b
This commit is contained in:
laibo102
2022-08-18 15:40:03 +08:00
parent ad7428abf9
commit a88d42c90a
+2 -3
View File
@@ -294,9 +294,8 @@ function createLocalStroageCallExpression(node: ts.PropertyDeclaration, name: st
ts.factory.createStringLiteral(localStorageLink && !localStorageProp ?
Array.from(localStorageLink)[0] : !localStorageLink && localStorageProp ?
Array.from(localStorageProp)[0] : COMPONENT_CONSTRUCTOR_UNDEFINED),
ts.factory.createNumericLiteral(node.initializer ? node.initializer.getText() :
COMPONENT_CONSTRUCTOR_UNDEFINED), ts.factory.createThis(),
ts.factory.createStringLiteral(name || COMPONENT_CONSTRUCTOR_UNDEFINED)
node.initializer ? node.initializer : ts.factory.createNumericLiteral(COMPONENT_CONSTRUCTOR_UNDEFINED),
ts.factory.createThis(), ts.factory.createStringLiteral(name || COMPONENT_CONSTRUCTOR_UNDEFINED)
]
);
}