-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promise with "chained" finally gobbles return value #17972
Comments
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
@hramos i think this is important to keep open .. yes? |
Sure. Looks like this needs to be addressed in |
Looks like this behavior is intentional: facebook/fbjs#95 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Closing as this is |
behaves differently to
If the finally is chained (first eg) any "then" or "catch" subsequently added will not receive the value from "resolve" "reject" "return" or "throw" that was above the "finally" in the chain.
Is this a bug report?
yes
Have you read the Contributing Guidelines?
kind of
Environment
Environment:
OS: Windows 10
Node: 9.0.0
Yarn: 1.3.2
npm: 5.5.1
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.0.0.0 AI-171.4408382
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.0 => 0.53.0
Steps to Reproduce
Run the sample code, observe the log results.
Expected Behavior
According to the documentation for promises that I've read, the two styles of implementation should be equal. Chaining the operations should be equivalent to putting each one on it's own line.
When the same code is run in a browser (using q), both versions produce the same (expected) result, in that the internal return/throw value is propagated out to the external then/catch.
Actual Behavior
(Write what happened. Add screenshots!)
Reproducible Demo
The text was updated successfully, but these errors were encountered: