-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Issues while using Google Closure Compiler on plotly-cartesian-1.57.1.js #5289
Comments
Thanks for the analysis. |
This one related to |
And I don't see that used in |
Hello !
I didn't know if I had to post this in the forum or here, but since I think that what I found could result in fixes, I have chosen to post this here.
I am using plotly-cartesian-1.57.1.js (which is currently the latest version of Plotly Cartesian) not minified and I tried Google's Closure Compiler on it.
It resulted what might be some issues in the code :
-line 584: unreachable code
return false;
That return may be unnecessary since it's just after an if-else condition that both throw an error.
-line 3807: Suspicious code. The result of the 'not' operator is not being used.
!function() {
Is the
!
necessary?-line 69736: Suspicious code. This code lacks side-effects. Is there a bug?
if(!locale) locale === 'en-US';
-line 69736: Suspicious code. The result of the 'sheq' operator is not being used.
if(!locale) locale === 'en-US';
Shouldn't it be
if(!locale) locale = 'en-US';
instead?-line 87184: unreachable code
for(i = 0; i < traces.length; i++) {
Since this for loop contains a
break;
that cannot be avoided, is it relevant to use a for loop to only do things with i==0 while i < traces.length?Is it me that (surely) didn't understand what the code does at these lines or these are real issues / oversights?
As always, thank you very much for your hard work!
The text was updated successfully, but these errors were encountered: