-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Example: const a = []; a === a
will evaluate to false
.
This is because getStaticValue
evaluates each reference to a variable separately, so we get different objects with the same value each time. However, they should be the same value.
Solution: Cache the value of each variable.
Non-solution: Change the ===
operator (among others) to not evaluate the equality of non-value types. This solution simply doesn't scale as built-in safe functions might use ===
under the hood.
Metadata
Metadata
Assignees
Labels
No labels