diff --git a/lib/6to5/transformation/templates/class-super-constructor-call.js b/lib/6to5/transformation/templates/class-super-constructor-call.js index c50d3a50cc..c9b822f013 100644 --- a/lib/6to5/transformation/templates/class-super-constructor-call.js +++ b/lib/6to5/transformation/templates/class-super-constructor-call.js @@ -1,3 +1,3 @@ -if (SUPER_NAME) { +if (SUPER_NAME !== null) { SUPER_NAME.apply(this, arguments); } diff --git a/test/fixtures/transformation/es6-classes/super-class-id-member-expression/expected.js b/test/fixtures/transformation/es6-classes/super-class-id-member-expression/expected.js index 3e58ae4cf4..a3dc10057d 100644 --- a/test/fixtures/transformation/es6-classes/super-class-id-member-expression/expected.js +++ b/test/fixtures/transformation/es6-classes/super-class-id-member-expression/expected.js @@ -15,7 +15,7 @@ var _inherits = function (child, parent) { var BaseController = (function () { var _Chaplin$Controller = Chaplin.Controller; var BaseController = function BaseController() { - if (_Chaplin$Controller) { + if (_Chaplin$Controller !== null) { _Chaplin$Controller.apply(this, arguments); } }; @@ -28,7 +28,7 @@ var BaseController = (function () { var BaseController2 = (function () { var _Chaplin$Controller$Another = Chaplin.Controller.Another; var BaseController2 = function BaseController2() { - if (_Chaplin$Controller$Another) { + if (_Chaplin$Controller$Another !== null) { _Chaplin$Controller$Another.apply(this, arguments); } }; diff --git a/test/fixtures/transformation/es6-classes/super-class/expected.js b/test/fixtures/transformation/es6-classes/super-class/expected.js index d57ed0b72c..50b689e121 100644 --- a/test/fixtures/transformation/es6-classes/super-class/expected.js +++ b/test/fixtures/transformation/es6-classes/super-class/expected.js @@ -15,7 +15,7 @@ var _inherits = function (child, parent) { var Test = (function () { var _Foo = Foo; var Test = function Test() { - if (_Foo) { + if (_Foo !== null) { _Foo.apply(this, arguments); } }; diff --git a/test/fixtures/transformation/optional-proto-to-assign/class/expected.js b/test/fixtures/transformation/optional-proto-to-assign/class/expected.js index 2f4501d427..2af2a9b699 100644 --- a/test/fixtures/transformation/optional-proto-to-assign/class/expected.js +++ b/test/fixtures/transformation/optional-proto-to-assign/class/expected.js @@ -25,7 +25,7 @@ var _inherits = function (child, parent) { var Foo = (function () { var _Bar = Bar; var Foo = function Foo() { - if (_Bar) { + if (_Bar !== null) { _Bar.apply(this, arguments); } };