Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

▲ [WARNING] Comparison using the "!==" operator here is always true [equals-new-object] #67

Open
xuelink opened this issue Apr 13, 2024 · 0 comments

Comments

@xuelink
Copy link
Contributor

xuelink commented Apr 13, 2024

> build
> remix build

 info  building... (NODE_ENV=development)
 info  built (975ms)
▲ [WARNING] Comparison using the "!==" operator here is always true [equals-new-object]

    build/index.js:50496:46:
      50496 │ ...ibuteName && [attributeName] !== from || !attributeName && s...
            ╵                                 ~~~

  Equality with a new object is always false in JavaScript because the equality operator tests object identity. You need to write code to compare the contents of the object instead. For example, use "Array.isArray(x) && x.length === 0" instead of "x === []" to test for an empty array.

Your worker has access to the following bindings:
- Analytics Engine Datasets:
  - WEB_COUNTER_AE: metricsDataset
- Vars:
  - VERSION: "(hidden)"
▲ [WARNING] Comparison using the "!==" operator here is always true [equals-new-object]

    build/index.js:50496:46:
      50496 │ ...ibuteName && [attributeName] !== from || !attributeName && s...
            ╵                                 ~~~

  Equality with a new object is always false in JavaScript because the equality operator tests object identity. You need to write code to compare the contents of the object instead. For example, use "Array.isArray(x) && x.length === 0" instead of "x === []" to test for an empty array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant