-
Notifications
You must be signed in to change notification settings - Fork 27
[AF-387][BUG] Fixes an issue where Save Hook rules aren't being respect for synchronous return #24
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
Conversation
…unction, if not a Promise
|
👍 with regression test |
lib/utils.js
Outdated
| } else if (isFalsy(res)) { | ||
| promise = Promise.reject(res); | ||
| } else { | ||
| promise = new Promise(function(resolve) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Promise.resolve, if i want to be a stickler
|
👍 |
| promise = new Promise(function(resolve) { | ||
| resolve(res); | ||
| }); | ||
| promise = Promise.resolve(res); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adammw 💇 To make "the stickler" less sticky
|
This PR was deployed to Production Release. Reference: v2.0.1 |
|
This PR was deployed to Update Major Version. Reference: v2.0.1 |
|
This PR was deployed to Production Release. Reference: v2.0.9 |
|
This PR was deployed to Pod19-Pod24 (Release). Reference: v2.0.16 |
✌️
/cc @zendesk/vegemite
Description
Where a Save Hook handler was returning immediately, rather than a Promise, the rules governing Save Hook return values weren't being respected.
References
JIRA: https://zendesk.atlassian.net/browse/AF-387
TODO
Add regression test04a8150 59a7ac7Risks