Closed
Bug 1687294
Opened 5 years ago
Closed 5 years ago
Falsy Symbol property value (0, false) erroneously printed as undefined
Categories
(DevTools :: Console, defect, P2)
DevTools
Console
Tracking
(firefox86 fixed)
RESOLVED
FIXED
86 Branch
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
Details
Attachments
(1 file)
Steps to reproduce
- Navigate to `data:text/html,<meta charset=utf8><script>class A { constructor() {this[Symbol()] = 0;this.b = 0;} }; a = new A(); console.dir(a);</script>
- Open the console`
Expected results
The expanded logged object looks like:
▼ {…}
| b: 0
| Symbol(): 0
| ▶︎ <prototype>: Object { … }
Actual results
the object is logged as:
▼ {…}
| b: 0
| Symbol(): undefined
| ▶︎ <prototype>: Object { … }
Assignee | ||
Comment 1•5 years ago
|
||
Here's the faulty line: https://searchfox.org/mozilla-central/rev/dac45cc7020dfddbcc937827810dd11550c07dc3/devtools/client/shared/components/object-inspector/utils/node.js#555-556 (we should use hasOwnProperty
instead of loosely checking the property value)
Assignee | ||
Comment 2•5 years ago
|
||
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aff3dcc8c40f
[devtools] Fix Symbol node value in ObjectInspector. r=bomsy.
Comment 4•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox86:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•