Skip to content

Incorrect Error constructor #153

@qtiki

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions