From 0429b660054e5b12e3f4ca61f688824facfc6278 Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Sat, 20 Jan 2024 22:45:01 +0800 Subject: [PATCH] Update optimizer.ts --- packages/forgetti/src/core/optimizer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forgetti/src/core/optimizer.ts b/packages/forgetti/src/core/optimizer.ts index 4f643c8..a5c26ce 100644 --- a/packages/forgetti/src/core/optimizer.ts +++ b/packages/forgetti/src/core/optimizer.ts @@ -471,7 +471,7 @@ export default class Optimizer { const expr = t.objectExpression([ t.objectProperty( t.identifier('current'), - init || t.identifier('undefined'), + init || t.unaryExpression('void', t.numericLiteral(0)), ), ]); return this.createMemo(expr, true, 'ref');