Avoid hitting __proto__ in _inheritsLoose (#12693)
This commit is contained in:
committed by
GitHub
parent
f7f0560bda
commit
9907bd86c9
@@ -474,10 +474,12 @@ helpers.inherits = helper("7.0.0-beta.0")`
|
||||
`;
|
||||
|
||||
helpers.inheritsLoose = helper("7.0.0-beta.0")`
|
||||
import setPrototypeOf from "setPrototypeOf";
|
||||
|
||||
export default function _inheritsLoose(subClass, superClass) {
|
||||
subClass.prototype = Object.create(superClass.prototype);
|
||||
subClass.prototype.constructor = subClass;
|
||||
subClass.__proto__ = superClass;
|
||||
setPrototypeOf(subClass, superClass);
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user