latentflip/loupe

Code Edit Bug

tobyf93 opened this issue · 2 comments

// Code Snippet
console.log('A');
setTimeout(() => console.log('B'), 0);
setTimeout(() => console.log('C'), 5000);
console.log('D');

The default code snippet seems to get executed instead of the one i'm pasting in...

Steps to reproduce:

  1. http://latentflip.com/loupe
  2. Copy/paste code snippet
  3. Click 'Save + Run'

Looking at the console.log, it looks like ES6 => syntax is not supported.

Try this instead:

// Code Snippet
console.log('A');
setTimeout(function B() { console.log('B'); }, 0);
setTimeout(function C() { console.log('C'); }, 5000);
console.log('D');

http://latentflip.com/loupe/?code=Ly8gQ29kZSBTbmlwcGV0CmNvbnNvbGUubG9nKCdBJyk7CnNldFRpbWVvdXQoZnVuY3Rpb24gQigpIHsgY29uc29sZS5sb2coJ0InKTsgfSwgMCk7CnNldFRpbWVvdXQoZnVuY3Rpb24gQygpIHsgY29uc29sZS5sb2coJ0MnKTsgfSwgNTAwMCk7CmNvbnNvbGUubG9nKCdEJyk7!!!

Thanks @jweinsteincbt, didn't think of that. Perhaps ES6 code has to result in an error...