Permalink
Browse files

Cache isArray property lookup.

  • Loading branch information...
1 parent b8ab66d commit 93e99f3fb5e0fc0f914831ffc4c989c5fb70ce50 @basecode basecode committed Jan 24, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/runner/text.js
View
@@ -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
@@ -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;
}) :

0 comments on commit 93e99f3

Please sign in to comment.