Skip to content

Commit ff38f7c

Browse files
committed
Null should be represented by null
1 parent 043e0de commit ff38f7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

AngleSharp.Scripting.JavaScript/Extensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static class Extensions
1919
public static JsValue ToJsValue(this Object obj, EngineInstance engine)
2020
{
2121
if (obj == null)
22-
return JsValue.Undefined;
22+
return JsValue.Null;
2323

2424
if (obj is String)
2525
return new JsValue((String)obj);
@@ -78,6 +78,7 @@ public static Object FromJsValue(this JsValue val)
7878

7979
return obj;
8080
case Types.Undefined:
81+
return "undefined";
8182
case Types.Null:
8283
return null;
8384
}

0 commit comments

Comments
 (0)