9 Commits

Author SHA1 Message Date
Daniel Tschinder
10cd6519d8 Fix class inheritance in IE <=10 (T3041) (#3527)
* Fix class inheritance in IE9 & IE10 (T3041)

Internet Explorer 9&10 do not support __proto__ at all, don't have
Object.setPrototypeOf(), but have Object.getPrototypeOf().

Because of this setting the prototype is not possible, which makes the
babelHelpers.inherits() function to set __proto__ although not supported.

Afterwards Object.getPrototypeOf() is used, but this one is not
respecting the "custom" property __proto__ that we set.

The solution is to check for __proto__ first and afterwards fallback to
Object.getPrototypeOf().

* Do the same logic in babel-helper-replace-supers

* Fix tests

* Extract creation of prototype nodes to small helper
2016-08-23 15:08:44 -04:00
Andrew Johnston
f408f28a02 Fix: assign _this to this when there is no Superclass - Fixes T7364
Closes gh-3508
2016-05-28 09:51:28 -04:00
Logan Smyth
63b328ce87 Revert "babylon: throw parse error if class properties do not have a semicolon (fixes T6873)"
This reverts commit 976edfc06740e434d1d5b136e28996a77f909403.
2016-02-06 18:36:31 -08:00
Henry Zhu
976edfc067 babylon: throw parse error if class properties do not have a semicolon (fixes T6873) 2015-12-30 14:01:46 -05:00
Ben Alpert
248f00fe82 Set function names from assignment expressions
Based on http://www.2ality.com/2015/09/function-names-es6.html.
2015-12-27 12:46:56 -08:00
Amjad Masad
0d8e5a9e86 Fix over-parenthesizing of function expressions 2015-12-24 14:55:51 -08:00
Sebastian McKenzie
1fa24b1efd rename babel-plugin-external-helpers-2 to babel-plugin-external-helpers 2015-12-24 03:54:40 +00:00
Logan Smyth
d71b59d0cc Ensure we always push into a BlockStatement - fixes T3051 2015-12-02 19:41:22 -08:00
phantom10111
36ebe0c939 Fix static class properties in class expressions and anonymous default exported classes - fixes T2983 2015-12-01 17:59:53 +01:00