phoboslab / Impact

HTML5 Game Engine
MIT License
1.99k stars 204 forks source link

ig.DebugMapsPanel redundant 'new' keyword #52

Open Joncom opened 5 years ago

Joncom commented 5 years ago

https://github.com/phoboslab/Impact/blob/6d06c2853294717cb7f078cae54c46996d15151c/lib/impact/debug/maps-panel.js#L49

Probably ought to be:

var head = ig.$new('strong');

I'm not even sure why the original doesn't throw an error, because all ig.$new does is

https://github.com/phoboslab/Impact/blob/6d06c2853294717cb7f078cae54c46996d15151c/lib/impact/impact.js#L110-L111

and new (document.createElement( 'strong' )); throws JavaScript error:

Uncaught TypeError: document.createElement(...) is not a constructor