Explorar o código

Safe guarding eval code result from null values

Sebastien Ros %!s(int64=12) %!d(string=hai) anos
pai
achega
ecea61f082
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Jint/Native/Function/EvalFunctionInstance.cs

+ 1 - 1
Jint/Native/Function/EvalFunctionInstance.cs

@@ -21,7 +21,7 @@ namespace Jint.Native.Function
 
             var parser = new JavascriptParser();
             var program = parser.Parse(code);
-            return _engine.ExecuteStatement(program).Value;
+            return _engine.ExecuteStatement(program).Value ?? Undefined.Instance;
         }
     }
 }