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)

defect

Tracking

(firefox86 fixed)

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(1 file)

Steps to reproduce

  1. 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>
  2. 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 { … }

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aff3dcc8c40f [devtools] Fix Symbol node value in ObjectInspector. r=bomsy.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: