diff --git a/compiler/src/process_component_class.ts b/compiler/src/process_component_class.ts index a0efe19..69b327f 100644 --- a/compiler/src/process_component_class.ts +++ b/compiler/src/process_component_class.ts @@ -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) ] ); }