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

constructor.name problematic use #17

Open
tcrespog opened this issue Sep 17, 2017 · 2 comments
Open

constructor.name problematic use #17

tcrespog opened this issue Sep 17, 2017 · 2 comments

Comments

@tcrespog
Copy link

Hi, I've noted that relying on constructor.name to verify the type of chart causes the plugin not to work when using code obfuscators or minimifiers. In this plunkr the problem is reproduced.

Maybe another way of checking the chart type could be used, or maybe the checking could be removed altogether.

@MaximeCouasnon
Copy link

The plugin is also broken in IE11. Please checkout #18 for a solution.

@goofballLogic
Copy link

Horrific client-side workaround:

var c = Chartist.Line.prototype.constructor;
Chartist.Line.prototype.constructor = function Line( container, data, options ) { 
    return c.call( this, container, data, options );
};

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

3 participants