GD-HTML5 icon indicating copy to clipboard operation
GD-HTML5 copied to clipboard

Incorrect Error constructor

Open qtiki opened this issue 5 years ago • 0 comments

The Error constructor parameter is incorrect here: https://github.com/GameDistribution/GD-HTML5/blob/db9b5ebfda359be3994c5e8744e48e9026725198/src/main.js#L1127

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): https://github.com/GameDistribution/GD-HTML5/blob/db9b5ebfda359be3994c5e8744e48e9026725198/src/main.js#L1314

qtiki avatar Jun 10 '20 20:06 qtiki