Skip to content

A ReferenceError: _classCallCheck is not defined error has occurred. #1872

@hex-ci

Description

@hex-ci

Expected behaviour

no error.

Actual behaviour

A ReferenceError: _classCallCheck is not defined error has occurred.

Steps to reproduce

After executing the

import Plyr from'plyr/dist/plyr.mjs
const player = new Plyr('#player');

code, a ReferenceError: _classCallCheck is not defined error will be reported.

Environment

  • Browser: chrome
  • Version: 83
  • Operating System: mac os
  • Version: 10.15

Console errors (if any)

ReferenceError: _classCallCheck is not defined

I think there is a problem with typeof navigator === "object" && in the first line of the following code (dist/plyr.mjs). After I executed it in the browser console, the _classCallCheck function could not be successfully defined.

typeof navigator === "object" && function _classCallCheck(instance, Constructor) {
  if (!(instance instanceof Constructor)) {
    throw new TypeError("Cannot call a class as a function");
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions