Skip to content

Commit

Permalink
refactor($animate): avoid unnecessary lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
gkalpak committed Jul 12, 2016
1 parent 76ca4f4 commit 489224b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ngAnimate/animateQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,10 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
bool = animationsEnabled = !!element;
} else {
var node = getDomNode(element);
var recordExists = disabledElementsLookup.get(node);

if (argCount === 1) {
// (element) - Element getter
bool = !recordExists;
bool = !disabledElementsLookup.get(node);
} else {
// (element, bool) - Element setter
disabledElementsLookup.put(node, !bool);
Expand Down

0 comments on commit 489224b

Please sign in to comment.