From 6ec3ac015f98658780f540b0789673381cbefebe Mon Sep 17 00:00:00 2001 From: Shuaibird Hwang Date: Tue, 25 Jul 2017 09:01:05 +0800 Subject: [PATCH] FIX access to the prototype of an instance The right way access to the prototype of an instance is using the `__proto__` rather than the `prototype`. --- packages/babel-plugin-transform-class-properties/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-plugin-transform-class-properties/README.md b/packages/babel-plugin-transform-class-properties/README.md index 9377f4bad249..083a505b54d8 100644 --- a/packages/babel-plugin-transform-class-properties/README.md +++ b/packages/babel-plugin-transform-class-properties/README.md @@ -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"