Commit 42c0384f authored by Yehuda Katz's avatar Yehuda Katz

Update browser build

parent a57ca10a
......@@ -142,8 +142,12 @@ define(
reject(allPromise, error);
};
for (i = 0; i < remaining; i++) {
promises[i].then(resolver(i), rejectAll);
for (i = 0; i < promises.length; i++) {
if (promises[i] && typeof promises[i].then === 'function') {
promises[i].then(resolver(i), rejectAll);
} else {
resolveAll(i, promises[i]);
}
}
return allPromise;
}
......
......@@ -329,8 +329,12 @@ define("rsvp",
reject(allPromise, error);
};
for (i = 0; i < remaining; i++) {
promises[i].then(resolver(i), rejectAll);
for (i = 0; i < promises.length; i++) {
if (promises[i] && typeof promises[i].then === 'function') {
promises[i].then(resolver(i), rejectAll);
} else {
resolveAll(i, promises[i]);
}
}
return allPromise;
}
......
(function(){var e,t;(function(){var n={},r={};e=function(e,t,r){n[e]={deps:t,callback:r}},t=function(e){if(r[e])return r[e];r[e]={};var i=n[e],s=i.deps,o=i.callback,u=[],a;for(var f=0,l=s.length;f<l;f++)s[f]==="exports"?u.push(a={}):u.push(t(s[f]));var c=o.apply(this,u);return r[e]=a||c}})(),e("rsvp/async",["exports"],function(e){"use strict";var t=typeof window!="undefined"?window:{},n=t.MutationObserver||t.WebKitMutationObserver,r;if(typeof process!="undefined"&&{}.toString.call(process)==="[object process]")r=function(e,t){process.nextTick(function(){e.call(t)})};else if(n){var i=[],s=new n(function(){var e=i.slice();i=[],e.forEach(function(e){var t=e[0],n=e[1];t.call(n)})}),o=document.createElement("div");s.observe(o,{attributes:!0}),window.addEventListener("unload",function(){s.disconnect(),s=null}),r=function(e,t){i.push([e,t]),o.setAttribute("drainQueue","drainQueue")}}else r=function(e,t){setTimeout(function(){e.call(t)},1)};e.async=r}),e("rsvp/events",["exports"],function(e){"use strict";var t=function(e,t){this.type=e;for(var n in t){if(!t.hasOwnProperty(n))continue;this[n]=t[n]}},n=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n][0]===t)return n;return-1},r=function(e){var t=e._promiseCallbacks;return t||(t=e._promiseCallbacks={}),t},i={mixin:function(e){return e.on=this.on,e.off=this.off,e.trigger=this.trigger,e},on:function(e,t,i){var s=r(this),o,u;e=e.split(/\s+/),i=i||this;while(u=e.shift())o=s[u],o||(o=s[u]=[]),n(o,t)===-1&&o.push([t,i])},off:function(e,t){var i=r(this),s,o,u;e=e.split(/\s+/);while(o=e.shift()){if(!t){i[o]=[];continue}s=i[o],u=n(s,t),u!==-1&&s.splice(u,1)}},trigger:function(e,n){var i=r(this),s,o,u,a,f;if(s=i[e])for(var l=0;l<s.length;l++)o=s[l],u=o[0],a=o[1],typeof n!="object"&&(n={detail:n}),f=new t(e,n),u.call(a,f)}};e.EventTarget=i}),e("rsvp",["rsvp/async","rsvp/events","exports"],function(e,t,n){"use strict";function f(e,t){s.async(function(){e.trigger("promise:resolved",{detail:t}),e.isFulfilled=!0,e.fulfillmentValue=t})}function l(e,t){s.async(function(){e.trigger("promise:failed",{detail:t}),e.isRejected=!0,e.rejectedReason=t})}function c(e){var t,n=[],r=new u,i=e.length;i===0&&f(r,[]);var s=function(e){return function(t){o(e,t)}},o=function(e,t){n[e]=t,--i===0&&f(r,n)},a=function(e){l(r,e)};for(t=0;t<i;t++)e[t].then(s(t),a);return r}function h(e,t){s[e]=t}function p(){var e={},t=new u(function(t,n){e.resolve=t,e.reject=n});return e.promise=t,e}var r=e.async,i=t.EventTarget,s={};s.async=r;var o=function(){},u=function(e){var t=this,n=function(e){f(t,e),n=o,r=o},r=function(e){l(t,e),n=o,r=o};this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this),this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this),e&&e(n,r)},a=function(e,t,n,r){var i=typeof n=="function",s,o,u,a;if(i)try{s=n(r.detail),u=!0}catch(c){a=!0,o=c}else s=r.detail,u=!0;s&&typeof s.then=="function"?s.then(function(e){f(t,e)},function(e){l(t,e)}):i&&u?f(t,s):a?l(t,o):e==="resolve"?f(t,s):e==="reject"&&l(t,s)};u.prototype={then:function(e,t){var n=new u;return this.isFulfilled&&s.async(function(){a("resolve",n,e,{detail:this.fulfillmentValue})},this),this.isRejected&&s.async(function(){a("reject",n,t,{detail:this.rejectedReason})},this),this.on("promise:resolved",function(t){a("resolve",n,e,t)}),this.on("promise:failed",function(e){a("reject",n,t,e)}),n}},i.mixin(u.prototype),n.Promise=u,n.all=c,n.defer=p,n.configure=h}),window.RSVP=t("rsvp")})();
(function(){var a,b;(function(){var c={},d={};a=function(a,b,d){c[a]={deps:b,callback:d}},b=function(a){if(d[a])return d[a];d[a]={};var e=c[a],f=e.deps,g=e.callback,h=[],i;for(var j=0,k=f.length;j<k;j++)f[j]==="exports"?h.push(i={}):h.push(b(f[j]));var l=g.apply(this,h);return d[a]=i||l}})(),a("rsvp/async",["exports"],function(a){"use strict";var b=typeof window!="undefined"?window:{},c=b.MutationObserver||b.WebKitMutationObserver,d;if(typeof process!="undefined"&&{}.toString.call(process)==="[object process]")d=function(a,b){process.nextTick(function(){a.call(b)})};else if(c){var e=[],f=new c(function(){var a=e.slice();e=[],a.forEach(function(a){var b=a[0],c=a[1];b.call(c)})}),g=document.createElement("div");f.observe(g,{attributes:!0}),window.addEventListener("unload",function(){f.disconnect(),f=null}),d=function(a,b){e.push([a,b]),g.setAttribute("drainQueue","drainQueue")}}else d=function(a,b){setTimeout(function(){a.call(b)},1)};a.async=d}),a("rsvp/events",["exports"],function(a){"use strict";var b=function(a,b){this.type=a;for(var c in b){if(!b.hasOwnProperty(c))continue;this[c]=b[c]}},c=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c][0]===b)return c;return-1},d=function(a){var b=a._promiseCallbacks;b||(b=a._promiseCallbacks={});return b},e={mixin:function(a){a.on=this.on,a.off=this.off,a.trigger=this.trigger;return a},on:function(a,b,e){var f=d(this),g,h;a=a.split(/\s+/),e=e||this;while(h=a.shift())g=f[h],g||(g=f[h]=[]),c(g,b)===-1&&g.push([b,e])},off:function(a,b){var e=d(this),f,g,h;a=a.split(/\s+/);while(g=a.shift()){if(!b){e[g]=[];continue}f=e[g],h=c(f,b),h!==-1&&f.splice(h,1)}},trigger:function(a,c){var e=d(this),f,g,h,i,j;if(f=e[a])for(var k=0;k<f.length;k++)g=f[k],h=g[0],i=g[1],typeof c!="object"&&(c={detail:c}),j=new b(a,c),h.call(i,j)}};a.EventTarget=e}),a("rsvp",["rsvp/async","rsvp/events","exports"],function(a,b,c){function n(){var a={},b=new h(function(b,c){a.resolve=b,a.reject=c});a.promise=b;return a}function m(a,b){f[a]=b}function l(a){var b,c=[],d=new h,e=a.length;e===0&&j(d,[]);var f=function(a){return function(b){g(a,b)}},g=function(a,b){c[a]=b,--e===0&&j(d,c)},i=function(a){k(d,a)};for(b=0;b<a.length;b++)a[b]&&typeof a[b].then=="function"?a[b].then(f(b),i):g(b,a[b]);return d}function k(a,b){f.async(function(){a.trigger("promise:failed",{detail:b}),a.isRejected=!0,a.rejectedReason=b})}function j(a,b){f.async(function(){a.trigger("promise:resolved",{detail:b}),a.isFulfilled=!0,a.fulfillmentValue=b})}"use strict";var d=a.async,e=b.EventTarget,f={};f.async=d;var g=function(){},h=function(a){var b=this,c=function(a){j(b,a),c=g,d=g},d=function(a){k(b,a),c=g,d=g};this.on("promise:resolved",function(a){this.trigger("success",{detail:a.detail})},this),this.on("promise:failed",function(a){this.trigger("error",{detail:a.detail})},this),a&&a(c,d)},i=function(a,b,c,d){var e=typeof c=="function",f,g,h,i;if(e)try{f=c(d.detail),h=!0}catch(l){i=!0,g=l}else f=d.detail,h=!0;f&&typeof f.then=="function"?f.then(function(a){j(b,a)},function(a){k(b,a)}):e&&h?j(b,f):i?k(b,g):a==="resolve"?j(b,f):a==="reject"&&k(b,f)};h.prototype={then:function(a,b){var c=new h;this.isFulfilled&&f.async(function(){i("resolve",c,a,{detail:this.fulfillmentValue})},this),this.isRejected&&f.async(function(){i("reject",c,b,{detail:this.rejectedReason})},this),this.on("promise:resolved",function(b){i("resolve",c,a,b)}),this.on("promise:failed",function(a){i("reject",c,b,a)});return c}},e.mixin(h.prototype),c.Promise=h,c.all=l,c.defer=n,c.configure=m}),window.RSVP=b("rsvp")})()
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