Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ig.DebugMapsPanel redundant 'new' keyword #52

Open
Joncom opened this issue Aug 16, 2019 · 0 comments
Open

ig.DebugMapsPanel redundant 'new' keyword #52

Joncom opened this issue Aug 16, 2019 · 0 comments

Comments

@Joncom
Copy link
Collaborator

Joncom commented Aug 16, 2019

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

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

Impact/lib/impact/impact.js

Lines 110 to 111 in 6d06c28

$new: function( name ) {
return document.createElement( name );

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

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

@Joncom Joncom changed the title ig.DebugMapsPanel redundant new keyword ig.DebugMapsPanel redundant 'new' keyword Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant