Skip to content

Commit 1f197fc

Browse files
Merge pull request #3985 from ide/array-check
Replace "instanceof Array" in transformer with "[object Array]" comparison
2 parents e339f5f + 2087923 commit 1f197fc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/coffee-script/helpers.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/helpers.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extend = exports.extend = (object, properties) ->
4949
exports.flatten = flatten = (array) ->
5050
flattened = []
5151
for element in array
52-
if element instanceof Array
52+
if '[object Array]' is Object::toString.call element
5353
flattened = flattened.concat flatten element
5454
else
5555
flattened.push element

0 commit comments

Comments
 (0)