Skip to content

Commit

Permalink
Avoid extra heavy work on array when not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Feb 3, 2016
1 parent 2c17aba commit cd9321a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dev/raphael.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,11 @@
args = arg.join("\u2400");

if (cache[has](args)) {
repush(count, args);

if (count[count.length - 1] !== args) {
repush(count, args);
}

return postprocessor ? postprocessor(cache[args]) : cache[args];
}

Expand Down

0 comments on commit cd9321a

Please sign in to comment.