Skip to content

Microsoft Edge bug?, Television? #19

Closed
@ghost

Description

Hi! I'm using the plugin in an Ionic project, everything seems to be working fine.

Works on Android, iOS, browsers like Chrome, Firefox, Safari.

All good, except Microsoft Edge 16.

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299

It crashes when I instantiate the WhichBrowser object.

Debugging in Microsoft Edge debugger, Shows that it crashes in a line (if statement)

here's the internal file: Television.js

/* Generic model information */

  static detectGenericTelevisionModels(ua) {
    let match;
    if ((match = /\(([^,(]+),\s*([^,(]+),\s*(?:[Ww]ired|[Ww]ireless)\)/u.exec(ua))) {               //  <----- IT CRASHES HERE
      const vendorName = Manufacturers.identify(Constants.deviceType.TELEVISION, match[1]);
      const modelName = match[2].trim();

There it is, the if statement.

Is this bug? What am I doing wrong?

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