Skip to content

Commit ba6bd04

Browse files
committed
Use Object.create for inheritance, not new.
Don't spread bad patterns.
1 parent 60f223d commit ba6bd04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ var Promise = require('promise');
4444
function Awesome(fn) {
4545
Promise.call(this, fn);
4646
}
47-
Awesome.prototype = new Promise();
47+
Awesome.prototype = Object.create(Promise.prototype);
4848
Awesome.prototype.constructor = Awesome;
4949

5050
//Awesome extension

0 commit comments

Comments
 (0)