diff --git a/lib/6to5/templates/extends.js b/lib/6to5/templates/extends.js index bc950dfd9a..1e8f6b5e8f 100644 --- a/lib/6to5/templates/extends.js +++ b/lib/6to5/templates/extends.js @@ -1,5 +1,5 @@ (function (child, parent) { - child.prototype = Object.create(parent.prototype, { + child.prototype = Object.create(parent && parent.prototype, { constructor: { value: child, enumerable: false, @@ -7,5 +7,5 @@ configurable: true } }); - child.__proto__ = parent; + if (parent) child.__proto__ = parent; })