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');