Please sign in to comment.
Break coercion cycles with cooperating promises
Cooperating promise libraries must implement `valueOf` to extract the fulfillment value from a fulfilled promise (or return the selfsame promise for an unresolved or rejected promise). This breaks cycles in coercion, where one library uses `resolve` to coerce a foreign promise to a local promise, which would in turn call `then` on the foreign promise, which would in turn attempt to coerce the promise with its own `resolve`, which would then in turn call `then` on our coerced promise, ad nauseum. Fixes #106.
- Loading branch information...