Skip to content

Commit

Permalink
Merge pull request #3985 from ide/array-check
Browse files Browse the repository at this point in the history
Replace "instanceof Array" in transformer with "[object Array]" comparison
  • Loading branch information
michaelficarra committed Jun 5, 2015
2 parents e339f5f + 2087923 commit 1f197fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/coffee-script/helpers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/helpers.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extend = exports.extend = (object, properties) ->
exports.flatten = flatten = (array) ->
flattened = []
for element in array
if element instanceof Array
if '[object Array]' is Object::toString.call element
flattened = flattened.concat flatten element
else
flattened.push element
Expand Down

0 comments on commit 1f197fc

Please sign in to comment.