Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

fix(bluebird): fix #1112, bluebird chained callback should return a Bluebird Promise - #1114

Merged
mhevery merged 1 commit into
angular:masterfrom
JiaLiPassion:bluebird-then
Jul 27, 2018
Merged

fix(bluebird): fix #1112, bluebird chained callback should return a Bluebird Promise#1114
mhevery merged 1 commit into
angular:masterfrom
JiaLiPassion:bluebird-then

Conversation

@JiaLiPassion

Copy link
Copy Markdown
Collaborator

fix#1112.
The issue can be described as the following case.

newBluebirdPromise((resolve: any,reject: any)=>{expect(Zone.current.name).toEqual('zone_A');resolve(1);}).then((r: any)=>{expect(r).toBe(1);expect(Zone.current.name).toEqual('zone_A');returnPromise.resolve(2);}).then((r: any)=>{expect(r).toBe(2);expect(Zone.current.name).toEqual('zone_A');});

So we should return a new bluebird promise in then callback.

@jrabbe

Copy link
Copy Markdown

Changes LGTM, would be great to have this merged and released as soon as convenient, @mhevery. Thank you.

@mhevery
mhevery merged commit 6ba3169 into angular:masterJul 27, 2018
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Patched bluebird does not provide data to promise chain

4 participants

@JiaLiPassion@jrabbe@mhevery@googlebot