aboutsummaryrefslogtreecommitdiffstats
path: root/src/jqLite.js
diff options
context:
space:
mode:
authorIgor Minar2011-09-01 15:13:42 -0700
committerIgor Minar2011-09-01 16:37:07 -0700
commit622c3ec97409c67ff316c317771b47880fa5c1e8 (patch)
tree1896ec6c159acd557ad7de1c480b56cf00d54bfc /src/jqLite.js
parentdb78aa1ce1c6e6a3f1ab0b569c78f160da239d4c (diff)
downloadangular.js-622c3ec97409c67ff316c317771b47880fa5c1e8.tar.bz2
fix(jqLite): addClass should ignore falsy values
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 ce9e612e..8cef64da 100644
--- a/src/jqLite.js
+++ b/src/jqLite.js
@@ -162,8 +162,8 @@ function JQLiteRemoveClass(element, selector) {
);
}
-function JQLiteAddClass(element, selector ) {
- if (!JQLiteHasClass(element, selector)) {
+function JQLiteAddClass(element, selector) {
+ if (selector && !JQLiteHasClass(element, selector)) {
element.className = trim(element.className + ' ' + selector);
}
}