Closed abhisekp closed 8 years ago
I took a look at this (catchy title) and it seems to be caused by DevTools' variable scoping, and not due to the transformer or the regexp. Even if you type the same directly into the console you get the bug results.
It seems to be due to the native window.name
property which can only ever be a string so anything assigned to it has .toString() applied.
Using a different variable/const name other than 'name' gives the correct results, and so does wrapping it in a function.
@r-murphy really? :flushed: thanks. Will try that and see.
btw, wasn't the title really cachy :smirk:
Thanks all, this does indeed seem to be from DevTools' variable scoping. Feel free to reopen if that's not the case though!
Run the following code using any compiler in the settings
Using browser JavaScript,