Fix comma errors in various js files (new jshint warning)
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 30 Sep 2013 15:02:55 +0000 (17:02 +0200)
committerKrinkle <krinklemail@gmail.com>
Mon, 30 Sep 2013 15:05:08 +0000 (15:05 +0000)
commit81fd2fc17ccb303418636ef60f1aa6c13d9842e0
tree77d09bda1789148045042c268025aa1f782a889f
parent3780115bac8c136aaacf0c42973bb031ba53aa73
Fix comma errors in various js files (new jshint warning)

We're about to upgrade to JSHint 2.x. Among various improvements
it now properly detects incorrect use of the comma operator.

This helped uncover two mistakes that could solve a bug, though
in this case the difference was purely in the semantics. The
endresult is unchanged.

Incorrect use of the comma operator can lead to assigning the
wrong value to a variable or causing an implied global variable.

> $ jshint --version
> jshint v2.1.11
> $ jshint .
> resources/jquery/jquery.textSelection.js: line 298, col 71, Expected an assignment or function call and instead saw an expression.
>
> tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js: line 99, col 44, Expected an assignment or function call and instead saw an expression.
>
> 2 errors

Change-Id: I6fdae5f66ef69b6526121cd7b1b2fbb0d9df7a62
resources/jquery/jquery.textSelection.js
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js