Skip to content

Commit

Permalink
Cache isArray property lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
basecode committed Jan 24, 2013
1 parent b8ab66d commit 93e99f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runner/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ define([
var accessor = tools.descriptorAccessor,
data = tools.descriptorData,
getter = tools.getter,
parseColor = color.parse;
parseColor = color.parse,
isArray = tools.isArray;

// Getters and setters stolen from shape.js

Expand Down Expand Up @@ -174,7 +175,7 @@ define([
*/
proto.addChild = function(child, index) {
var isTextSpan =
tools.isArray(child) ?
isArray(child) ?
child.every(function(child) {
return child instanceof TextSpan;
}) :
Expand Down

0 comments on commit 93e99f3

Please sign in to comment.