Skip to content

Commit af0e124

Browse files
committed
Fixed an issue that broke object inspection.
1 parent b2991fc commit af0e124

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ecma-debugger/objectinspection.6.0/inspectablejsobject.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,8 +941,12 @@ cls.InspectionsPrototype = function()
941941
{
942942
this.add = function(obj)
943943
{
944-
this[obj.object_id] = obj;
945944
this._objects[obj.object_id] = obj;
945+
var id = obj.id || obj.name;
946+
if (id)
947+
this[id] = obj;
948+
else
949+
throw "The object must have and id or a name";
946950
};
947951

948952
/**

0 commit comments

Comments
 (0)