You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Linux stola-ThinkPad 3.16.0-38-generic io.js on The Changelog! #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Subsystem: util
util.inspect(Object.setPrototypeOf(function() {}, null)) results in
TypeError: Cannot read property 'name' of null
at formatValue (util.js:523:35)
at Object.inspect (util.js:324:10)
Note that this is the code that is used by REPL to print the result of Object.setPrototypeOf(function() {}, null) expression.
This TypeError is confusing and unnecessary. It comes from constructor.name in util.js:523. Few lines above (line 457) there is const ctorName = ... code that attempts to avoid problems like this, i.e., it would be sufficient to use ctorName instead of constructor.name on line 523.