FIX access to the prototype of an instance (#6005)

The right way access to the prototype of an instance is using the `__proto__` rather than the `prototype`.
This commit is contained in:
Shuaibird Hwang
2017-07-25 09:46:38 +08:00
committed by Justin Ridgewell
parent fe13ba8fc2
commit 4d51052037

View File

@@ -24,7 +24,7 @@ Below is a class with four class properties which will be transformed.
let myBork = new Bork;
//Property initializers are not on the prototype.
console.log(myBork.prototype.boundFunction); // > undefined
console.log(myBork.__proto__.boundFunction); // > undefined
//Bound functions are bound to the class instance.
console.log(myBork.boundFunction.call(undefined)); // > "bork"