Permalink
Browse files

Remove `useUnderscoreClone` check from the `underscore` build `_.toAr…

…ray` replacement.
  • Loading branch information...
1 parent d9e9b37 commit 37ec2997433b7c0b2fb492d8e3ff286b55da3de3 @jdalton jdalton committed Mar 28, 2013
Showing with 11 additions and 13 deletions.
  1. +11 −13 build.js
View
@@ -2323,19 +2323,17 @@
].join('\n'));
// replace `_.toArray`
- if (useUnderscoreClone) {
- source = replaceFunction(source, 'toArray', [
- 'function toArray(collection) {',
- ' if (isArray(collection)) {',
- ' return slice(collection);',
- ' }',
- " if (collection && typeof collection.length == 'number') {",
- ' return map(collection);',
- ' }',
- ' return values(collection);',
- '}'
- ].join('\n'));
- }
+ source = replaceFunction(source, 'toArray', [
+ 'function toArray(collection) {',
+ ' if (isArray(collection)) {',
+ ' return slice(collection);',
+ ' }',
+ " if (collection && typeof collection.length == 'number') {",
+ ' return map(collection);',
+ ' }',
+ ' return values(collection);',
+ '}'
+ ].join('\n'));
// replace `_.uniq`
source = replaceFunction(source, 'uniq', [

0 comments on commit 37ec299

Please sign in to comment.