diff options
author | Paris <ptheofan@gmail.com> | 2014-05-13 14:07:48 +0200 |
---|---|---|
committer | Paris <ptheofan@gmail.com> | 2014-05-13 14:07:48 +0200 |
commit | daf19952070e5ec87356c2869896420cd8dba690 (patch) | |
tree | d89cc1d3304cb74db17fbd71d8b6d6049f5e0a59 | |
parent | 6016d4b21ffa06be462ae75bf98b209012236071 (diff) | |
download | multi-select-daf19952070e5ec87356c2869896420cd8dba690.zip multi-select-daf19952070e5ec87356c2869896420cd8dba690.tar.gz multi-select-daf19952070e5ec87356c2869896420cd8dba690.tar.bz2 |
Bugfix: char is a reserved keyword for Javascript
`char` was used as a variable name (check at the bottom of the page @ http://www.crockford.com/javascript/survey.html) and thus closure compiler throws ERROR and quits. This fix just renames the variable so that js can be minified.
-rw-r--r-- | js/jquery.multi-select.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js index 5f2bbd1..dfc92db 100644 --- a/js/jquery.multi-select.js +++ b/js/jquery.multi-select.js @@ -474,12 +474,12 @@ }, sanitize: function(value){ - var hash = 0, i, char; + var hash = 0, i, character; if (value.length == 0) return hash; var ls = 0; for (i = 0, ls = value.length; i < ls; i++) { - char = value.charCodeAt(i); - hash = ((hash<<5)-hash)+char; + character = value.charCodeAt(i); + hash = ((hash<<5)-hash)+character; hash |= 0; // Convert to 32bit integer } return hash; |