Use Object.create(null) in __extends when base is null

This commit is contained in:
Anders Hejlsberg committed 2015-06-16 12:13:18 -07:00
1 parent 718dc5b7a8
commit 3b5d73f5ce
1 file changed
+1 -2
+1 -2
View File
@@ -21,8 +21,7 @@ namespace ts {
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};`;
// emit output for the __decorate helper function