From 003c44eceee54c3398b0d2971fd97a512d7f7cec Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Wed, 8 Oct 2014 14:22:48 -0400 Subject: [PATCH] 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. --- src/ng/animate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/animate.js b/src/ng/animate.js index 7a27b0db..13a0049a 100644 --- a/src/ng/animate.js +++ b/src/ng/animate.js @@ -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) {