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

Suspicious use of the "!" operator inside the "instanceof" operator #118

Open
j4y opened this issue Oct 1, 2024 · 0 comments
Open

Suspicious use of the "!" operator inside the "instanceof" operator #118

j4y opened this issue Oct 1, 2024 · 0 comments

Comments

@j4y
Copy link

j4y commented Oct 1, 2024

I'm upgrading an application to Angular 18 and the new build system throws a warning:

▲ [WARNING] Suspicious use of the "!" operator inside the "instanceof" operator [suspicious-boolean-not]

    src/my-application/app/vendor/zing-touch/zingtouch.min.js:893:14:
      893 │           if (!t instanceof u) throw new Error("Parameter gesture...
          │               ~~
          ╵               (!t)

  The code "!x instanceof y" is parsed as "(!x) instanceof y". You need to insert parentheses to get "!(x instanceof y)" instead.

It doesn't look like a big deal, but the fix looks pretty simple.

This is with the latest zingtouch.min.js from the dist directory.

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