From b9dde49ab6c3c86674713894b6c2eec665e8c1c5 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 22 Jul 2015 17:28:58 +0100 Subject: [PATCH] use Object.setPrototypeOf and fallback to __proto__ in inherits helper - fixes #2053 --- packages/babel/src/transformation/templates/helper-inherits.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel/src/transformation/templates/helper-inherits.js b/packages/babel/src/transformation/templates/helper-inherits.js index 5596366744..87d9ccaede 100644 --- a/packages/babel/src/transformation/templates/helper-inherits.js +++ b/packages/babel/src/transformation/templates/helper-inherits.js @@ -10,5 +10,5 @@ configurable: true } }); - if (superClass) subClass.__proto__ = superClass; + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; })