Closed jbt closed 7 years ago
Looks like [].slice || (...anything) gets replaced with emptystring.
[].slice || (...anything)
For example: [].slice||1; 1 becomes ,1 (link)
[].slice||1; 1
,1
A less contrived example: var slice = [].slice || function() {...}, somethingElse = 1; becomes var slice=,somethingElse=1 (link)
var slice = [].slice || function() {...}, somethingElse = 1;
var slice=,somethingElse=1
Seems to happen with .slice and other array methods like indexOf, but not for any old property (i.e. [].foo is fine)
.slice
indexOf
[].foo
Released 0.4 with the fix, thanks
Looks like
[].slice || (...anything)
gets replaced with emptystring.For example:
[].slice||1; 1
becomes,1
(link)A less contrived example:
var slice = [].slice || function() {...}, somethingElse = 1;
becomesvar slice=,somethingElse=1
(link)Seems to happen with
.slice
and other array methods likeindexOf
, but not for any old property (i.e.[].foo
is fine)