diff --git a/lib/evaluateSnippets.js b/lib/evaluateSnippets.js index 0285a51..5f1b71c 100644 --- a/lib/evaluateSnippets.js +++ b/lib/evaluateSnippets.js @@ -27,7 +27,7 @@ try { } catch (e) { transpile = function transpile(code) { // Avoid "Identifier '...' has already been declared" - return code.replace(/\bconst\s/g, 'var '); + return code.replace(/\b(?:const|let)\s/g, 'var '); }; }