Encoding undefined
Closed this issue · 2 comments
voliva commented
When trying to encode the string "undefined", it encodes it as [[][[]]]+[]
However, this is wrong, because [[][[]]]
evaluates to [undefined]
and when converting this to string by +[]
, then it results in ""
I think it should either get the first element by [+[]]
and then converting to string, so the result should be: [[][[]]][+[]]+[]
, or better yet, not wrap undefined into an array, by getting it to [][[]]+[]
EvanCarroll commented