Commit b0c4596d authored by Romain Courteaud's avatar Romain Courteaud

Publish build version of rsvp.

parent fa862176
...@@ -123,8 +123,8 @@ Promise.prototype = { ...@@ -123,8 +123,8 @@ Promise.prototype = {
this.off('error', onerror); this.off('error', onerror);
var thenPromise = new this.constructor(function() {}, var thenPromise = new this.constructor(function() {},
function () { function (msg) {
thenPromise.trigger('promise:cancelled', {}); thenPromise.trigger('promise:cancelled', { msg: msg});
}); });
if (this.isFulfilled) { if (this.isFulfilled) {
...@@ -184,7 +184,7 @@ function handleThenable(promise, value) { ...@@ -184,7 +184,7 @@ function handleThenable(promise, value) {
if (isFunction(then)) { if (isFunction(then)) {
promise.on('promise:cancelled', function(event) { promise.on('promise:cancelled', function(event) {
if (isFunction(value.cancel)) { if (isFunction(value.cancel)) {
value.cancel(); value.cancel(event.msg);
} }
}); });
then.call(value, function(val) { then.call(value, function(val) {
......
...@@ -592,8 +592,8 @@ define("rsvp/promise", ...@@ -592,8 +592,8 @@ define("rsvp/promise",
this.off('error', onerror); this.off('error', onerror);
var thenPromise = new this.constructor(function() {}, var thenPromise = new this.constructor(function() {},
function () { function (msg) {
thenPromise.trigger('promise:cancelled', {}); thenPromise.trigger('promise:cancelled', { msg: msg});
}); });
if (this.isFulfilled) { if (this.isFulfilled) {
...@@ -653,7 +653,7 @@ define("rsvp/promise", ...@@ -653,7 +653,7 @@ define("rsvp/promise",
if (isFunction(then)) { if (isFunction(then)) {
promise.on('promise:cancelled', function(event) { promise.on('promise:cancelled', function(event) {
if (isFunction(value.cancel)) { if (isFunction(value.cancel)) {
value.cancel(); value.cancel(event.msg);
} }
}); });
then.call(value, function(val) { then.call(value, function(val) {
......
...@@ -629,8 +629,8 @@ define("rsvp/promise", ...@@ -629,8 +629,8 @@ define("rsvp/promise",
this.off('error', onerror); this.off('error', onerror);
var thenPromise = new this.constructor(function() {}, var thenPromise = new this.constructor(function() {},
function () { function (msg) {
thenPromise.trigger('promise:cancelled', {}); thenPromise.trigger('promise:cancelled', { msg: msg});
}); });
if (this.isFulfilled) { if (this.isFulfilled) {
...@@ -690,7 +690,7 @@ define("rsvp/promise", ...@@ -690,7 +690,7 @@ define("rsvp/promise",
if (isFunction(then)) { if (isFunction(then)) {
promise.on('promise:cancelled', function(event) { promise.on('promise:cancelled', function(event) {
if (isFunction(value.cancel)) { if (isFunction(value.cancel)) {
value.cancel(); value.cancel(event.msg);
} }
}); });
then.call(value, function(val) { then.call(value, function(val) {
......
This diff is collapsed.
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