Permalink
Browse files

Fix so null is boxed as BoxedNull

  • Loading branch information...
1 parent a587314 commit d83d82edc6019440debf138890d9d22066c796f5 @rbishop-xx committed Apr 9, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 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)

0 comments on commit d83d82e

Please sign in to comment.