From 3d8f2dc9e3fbbc4ad1aa41d29d5be8b9c20534d6 Mon Sep 17 00:00:00 2001 From: "Alexis H. Munsayac" Date: Sat, 20 Jan 2024 22:43:42 +0800 Subject: [PATCH] Update simplify-expressions.ts --- packages/forgetti/src/core/simplify-expressions.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/forgetti/src/core/simplify-expressions.ts b/packages/forgetti/src/core/simplify-expressions.ts index f76b5df..d2c8bfd 100644 --- a/packages/forgetti/src/core/simplify-expressions.ts +++ b/packages/forgetti/src/core/simplify-expressions.ts @@ -17,16 +17,7 @@ function getBooleanishState(node: t.Expression): LiteralState { case 'BigIntLiteral': return node.value === '0' ? 'falsy' : 'truthy'; case 'Identifier': { - switch (node.name) { - case 'NaN': - return 'falsy'; - case 'undefined': - return 'nullish'; - case 'Infinity': - return 'truthy'; - default: - return 'indeterminate'; - } + return 'indeterminate'; } // case 'ArrayExpression': // case 'FunctionExpression':