Skip to content

Commit 19349ad

Browse files
author
Chris K
committed
Review fixes.
1 parent 5b05b1c commit 19349ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ cls.EcmascriptDebugger["6.0"].InspectableJSObject.prototype = new function()
138138
throw "not valid path in InspectableJSObject._get_subtree";
139139

140140
if (!tree.get("protos"))
141-
tree.set("protos", new Dict());
141+
tree.set("protos", new Dict());
142142
var protos = tree.get("protos");
143143
if (!protos.get(index))
144144
protos.set(index, new Dict());

src/lib/dict.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ var Dict = function(obj)
88
Dict.prototype = new function()
99
{
1010
var PREFIX = "$";
11+
var to_string = Object.prototype.toString.call.bind(Object.prototype.toString);
1112

1213
this.get = function(key) { return this._dict[PREFIX + key]; };
1314

@@ -59,8 +60,7 @@ Dict.prototype = new function()
5960
for (var key in obj)
6061
{
6162
var value = obj[key];
62-
if (Object.prototype.toString.call(value) == "[object Object]" &&
63-
!(value instanceof Dict))
63+
if (to_string(value) == "[object Object]" && !(value instanceof Dict))
6464
value = new Dict(value);
6565
this.set(key, value);
6666
}

0 commit comments

Comments
 (0)