perf($animate): don't join classes before it's necessary in resolveElementClasses

In ngAnimate, we can't do this because the behaviour is exposed via the API. But
in core, we can avoid a bit of work.
This commit is contained in:
Caitlin Potter
2014-10-08 14:22:48 -04:00
parent 9e4701a5ab
commit 003c44ecee

View File

@@ -116,7 +116,7 @@ var $AnimateProvider = ['$provide', function($provide) {
}
});
return (toAdd.length + toRemove.length) > 0 && [toAdd.join(' '), toRemove.join(' ')];
return (toAdd.length + toRemove.length) > 0 && [toAdd.length && toAdd, toRemove.length && toRemove];
}
function cachedClassManipulation(cache, classes, op) {