You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var engine = new Engine();
engine.SetValue("x", (string)null);
will throw, because SetValue calls JsString.Create directly which doesn't make null checks.
Fix:
I see two potential fixes for that:
Make JsString.Create return a JsValue that could either be Null or the JsString, this would always work but may be troublesome
Simply add an if statement in Engine.SetValue(string, string) to either set a JsString or null. This is safer but other places may also be affected that I didn't notice.
Problem:
For example, this code:
will throw, because SetValue calls
JsString.Create
directly which doesn't make null checks.Fix:
I see two potential fixes for that:
if
statement inEngine.SetValue(string, string)
to either set aJsString
ornull
. This is safer but other places may also be affected that I didn't notice.Since:
3.0.0-beta-2045 (commit 6839807)
In any case the fix is dead simple, I just want to make sure I'm not missing something this change did intentionally.
The text was updated successfully, but these errors were encountered: