Skip to content

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

Description

@j4y

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions