GD-HTML5
GD-HTML5 copied to clipboard
Incorrect Error constructor
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