Merge pull request #102 from FreezePhoenix/patch-9

Fix small bug with async code snippets
This commit is contained in:
Kaan Soral
2024-02-21 16:05:06 +03:00
committed by GitHub
+1 -1
View File
@@ -1663,7 +1663,7 @@ function code_eval(snippet)
{
var f="eval";
if(snippet.search("output=")!=-1 || snippet.search("json_output=")!=-1) f="eval_s";
if(snippet.search("await")!=-1) snippet="(async () => {"+snippet+"})()";
if(snippet.search("await")!=-1) snippet="(async () => {"+snippet+"\n})()";
if(code_active)
{
call_code_function(f,snippet);