Skip to content

Commit

Permalink
FIX access to the prototype of an instance (#6005)
Browse files Browse the repository at this point in the history
The right way access to the prototype of an instance is using the `__proto__` rather than the `prototype`.
  • Loading branch information
shuaibird authored and jridgewell committed Jul 25, 2017
1 parent fe13ba8 commit 4d51052
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-class-properties/README.md
Expand Up @@ -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"
Expand Down

0 comments on commit 4d51052

Please sign in to comment.