util: make inherits work with classes
The current implementation overwrites the prototype of the target constructor. It is not allowed with ES2015 classes because the prototype property is read only. Use Object.setPrototypeOf instead. Fixes: https://github.com/nodejs/node/issues/3452 PR-URL: https://github.com/nodejs/node/pull/3455 Reviewed-By:Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
parent
437930c0
Please register or sign in to comment