Skip to content

Incorrect Error constructor #153

Description

@qtiki

The Error constructor parameter is incorrect here:

throw new Error("Unsupported an advertisement type: ", adType);

According to MDN the second parameter for the Error constructor is an optional filename: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Error

I think the line should say:

throw new Error("Unsupported an advertisement type: " + adType);

It seems that in other places of the code (like preloadAd) it is correct (although to be precise it's missing the whitespace after the colon):

throw new Error("Unsupported an advertisement type:" + adType);

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