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

is entry in jquery-comments valid #3

Closed
emaslow opened this issue Jul 9, 2015 · 2 comments
Closed

is entry in jquery-comments valid #3

emaslow opened this issue Jul 9, 2015 · 2 comments
Assignees
Labels

Comments

@emaslow
Copy link

emaslow commented Jul 9, 2015

The following line 542 appears in jquery-comments.js:
if(commentId = textarea.attr('data-comment')) {
Webmatrix labels it as an error as well the equivalent statement in the minimized version.
I am still working my way through an understanding of jscript and still have a long way to go, but my experience as programmer tells me that this is a conditional statement that is always true because its argument merely sets the value of the variable. This conditional statement serves no function. Should it be "==" ?, or am I misunderstanding something?
There are also a dozen or more instances of variable lists ending with a unnecessary comma after the last entry which WebMatrix flags as errors. This is not a problem because the minimizing program seems to ignore them.

jessenieminen pushed a commit that referenced this issue Jul 23, 2015
@jessenieminen
Copy link
Member

Hi and thanks for the report @emaslow !

You're correct, it should indeed be "==".

I've fixed the issue in a new commit here: fa36d65

As for the errors regarding line unnecessary commas in WebMatrix, it's true that they don't really affect anything. I also think that those errors are a result of the WebMatrix syntax checker not realising that there might be empty rows within lists. Could you confirm if those errors are coming from rows immediately followed by empty rows?

@emaslow
Copy link
Author

emaslow commented Jul 27, 2015

Thank you, jessenieminen, I did assume a typo.
The commas only occur for the last item in a given list, no empty rows. But, it is that they are not needed for the standard and not necessarily wrong. Most interpreters just ignore them. WebMatrix is just picky. No problem when you realize this, but a bit of a nuisance. It's easier to just delete the commas than to ignore them.

jessenieminen added a commit that referenced this issue Sep 15, 2015
jessenieminen added a commit that referenced this issue Sep 15, 2015
This reverts commit 02b8b19ebd9278aec21b0670e270e411c05585b9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants