You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This issue has been automatically closed because we haven't received a response from the original author 🙈. This automation helps keep the issue tracker clean from issues that aren't actionable. Please reach out if you have more information for us! 🙂
Example:
const a = []; a === a
will evaluate tofalse
.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.Transferred from mysticatea#32
The text was updated successfully, but these errors were encountered: