Commit 29da8cf8 authored by Michaël Zasso's avatar Michaël Zasso
Browse files

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: default avatarSakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 437930c0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment