Commit 78e4ef86 authored by Yehuda Katz's avatar Yehuda Katz

Fix subclassing bug

parent ec8dce36
......@@ -465,7 +465,7 @@ define("rsvp/promise",
then: function(done, fail) {
this.off('error', onerror);
var thenPromise = new Promise(function() {});
var thenPromise = new this.constructor(function() {});
if (this.isFulfilled) {
config.async(function() {
......
This diff is collapsed.
......@@ -96,7 +96,7 @@ define(
then: function(done, fail) {
this.off('error', onerror);
var thenPromise = new Promise(function() {});
var thenPromise = new this.constructor(function() {});
if (this.isFulfilled) {
config.async(function() {
......
......@@ -92,7 +92,7 @@ Promise.prototype = {
then: function(done, fail) {
this.off('error', onerror);
var thenPromise = new Promise(function() {});
var thenPromise = new this.constructor(function() {});
if (this.isFulfilled) {
config.async(function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment