coderaiser/putout

[printer] [bug]

grayflow opened this issue ยท 2 comments

code = 'if (e.indexTheme) var c = e.theme + (e.level + 10 * e.indexTheme) + ")"; else c = e.theme + e.level + ")";'
'if (e.indexTheme) var c = e.theme + (e.level + 10 * e.indexTheme) + ")"; else c = e.theme + e.level + ")";'
> console.log(putout(code).code)
if (e.indexTheme)
var c = e.theme + (e.level + 10 * e.indexTheme) + ')'else
    c = e.theme + e.level + ')';
> eval(putout(code).code)
Uncaught SyntaxError: Unexpected token 'else'

Thanks! Just, fixed ๐ŸŽ‰! Please re-install ๐ŸŠPutout. Is it works for you?

Could you please tell me why you use such code?

if (a)
    var b;

Closed due to a long time of inactivity ๐Ÿ