update classes tests to work with new _extends method

This commit is contained in:
Sebastian McKenzie 2014-12-14 14:49:37 +11:00
parent 00cb90541a
commit 77f9596682
7 changed files with 14 additions and 14 deletions

View File

@ -2,7 +2,7 @@
var _slice = Array.prototype.slice;
var _extends = function (child, parent) {
child.prototype = Object.create(parent.prototype, {
child.prototype = Object.create(parent && parent.prototype, {
constructor: {
value: child,
enumerable: false,
@ -10,7 +10,7 @@ var _extends = function (child, parent) {
configurable: true
}
});
child.__proto__ = parent;
if (parent) child.__proto__ = parent;
};
var Test = function Test() {

View File

@ -1,7 +1,7 @@
"use strict";
var _extends = function (child, parent) {
child.prototype = Object.create(parent.prototype, {
child.prototype = Object.create(parent && parent.prototype, {
constructor: {
value: child,
enumerable: false,
@ -9,7 +9,7 @@ var _extends = function (child, parent) {
configurable: true
}
});
child.__proto__ = parent;
if (parent) child.__proto__ = parent;
};
var Test = function Test() {

View File

@ -1,7 +1,7 @@
"use strict";
var _extends = function (child, parent) {
child.prototype = Object.create(parent.prototype, {
child.prototype = Object.create(parent && parent.prototype, {
constructor: {
value: child,
enumerable: false,
@ -9,7 +9,7 @@ var _extends = function (child, parent) {
configurable: true
}
});
child.__proto__ = parent;
if (parent) child.__proto__ = parent;
};
var Test = function Test() {

View File

@ -1,7 +1,7 @@
"use strict";
var _extends = function (child, parent) {
child.prototype = Object.create(parent.prototype, {
child.prototype = Object.create(parent && parent.prototype, {
constructor: {
value: child,
enumerable: false,
@ -9,7 +9,7 @@ var _extends = function (child, parent) {
configurable: true
}
});
child.__proto__ = parent;
if (parent) child.__proto__ = parent;
};
var Test = function Test() {

View File

@ -1,7 +1,7 @@
"use strict";
var _extends = function (child, parent) {
child.prototype = Object.create(parent.prototype, {
child.prototype = Object.create(parent && parent.prototype, {
constructor: {
value: child,
enumerable: false,
@ -9,7 +9,7 @@ var _extends = function (child, parent) {
configurable: true
}
});
child.__proto__ = parent;
if (parent) child.__proto__ = parent;
};
var BaseController = function BaseController() {

View File

@ -1,7 +1,7 @@
"use strict";
var _extends = function (child, parent) {
child.prototype = Object.create(parent.prototype, {
child.prototype = Object.create(parent && parent.prototype, {
constructor: {
value: child,
enumerable: false,
@ -9,7 +9,7 @@ var _extends = function (child, parent) {
configurable: true
}
});
child.__proto__ = parent;
if (parent) child.__proto__ = parent;
};
var _QSuper = function () {};

View File

@ -1,7 +1,7 @@
"use strict";
var _extends = function (child, parent) {
child.prototype = Object.create(parent.prototype, {
child.prototype = Object.create(parent && parent.prototype, {
constructor: {
value: child,
enumerable: false,
@ -9,7 +9,7 @@ var _extends = function (child, parent) {
configurable: true
}
});
child.__proto__ = parent;
if (parent) child.__proto__ = parent;
};
var Test = function Test() {