Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix so null is boxed as BoxedNull

  • Loading branch information...
commit d83d82edc6019440debf138890d9d22066c796f5 1 parent a587314
@rbishop-xx authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 Src/IronJS.Runtime/BoxedValue.cs
View
6 Src/IronJS.Runtime/BoxedValue.cs
@@ -124,6 +124,9 @@ public object UnboxObject()
public static BoxedValue Box(CommonObject value)
{
+ if (value == null)
+ return Environment.BoxedNull;
+
var box = new BoxedValue();
box.Clr = value;
box.Tag = TypeTags.Object;
@@ -170,6 +173,9 @@ public static BoxedValue Box(bool value)
public static BoxedValue Box(object value)
{
+ if (value == null)
+ return Environment.BoxedNull;
+
if (value is double)
return Box((double)value);
if (value is int)
Please sign in to comment.
Something went wrong with that request. Please try again.