aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
authorMisko Hevery2011-08-17 12:19:43 -0700
committerIgor Minar2011-10-11 10:53:06 -0700
commitb96e978178a6acbf048aa6db466ed845e1395445 (patch)
tree246dabb330f69d8f7e49bcb771d07f008513e396 /src/jqLite.js
parentbda2bba2be7a52bf39fb1b257b6363edc7b71173 (diff)
downloadangular.js-b96e978178a6acbf048aa6db466ed845e1395445.tar.bz2
fix(jqlite): removeClass would clobber class names
Diffstat (limited to 'src/jqLite.js')
-rw-r--r--src/jqLite.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jqLite.js b/src/jqLite.js
index ae540e89..5f761f92 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -208,8 +208,8 @@ function JQLiteData(element, key, value) {
function JQLiteHasClass(element, selector, _) {
// the argument '_' is important, since it makes the function have 3 arguments, which
// is needed for delegate function to realize the this is a getter.
- var className = " " + selector + " ";
- return ((" " + element.className + " ").replace(/[\n\t]/g, " ").indexOf( className ) > -1);
+ return ((" " + element.className + " ").replace(/[\n\t]/g, " ").
+ indexOf( " " + selector + " " ) > -1);
}
function JQLiteRemoveClass(element, selector) {