Skip to content
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

Updating Readme.md file #2305

Closed
wants to merge 1 commit into from
Closed

Updating Readme.md file #2305

wants to merge 1 commit into from

Conversation

ikmrgrv
Copy link

@ikmrgrv ikmrgrv commented Jul 24, 2019

Updated .then() to .finally() at the end of Promise.

Instead of .finally() at the end of Promise, .then() was written.

Updated `.then()` to `.finally()` at the end of Promise.
Copy link
Collaborator

@chinesedfan chinesedfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc is correct. finally is not a standard method of Promise. If then was after catch, it behaviors like finally.

If you prefer finally, see Promise.prototype.finally to add a shim.

@ikmrgrv
Copy link
Author

ikmrgrv commented Jul 26, 2019

The doc is correct. finally is not a standard method of Promise. If then was after catch, it behaviors like finally.

If you prefer finally, see Promise.prototype.finally to add a shim.

I agree that .then after .catch behaves like .finally.
But .finally makes the context more clear than .then.
It conveys the flow pretty clearly. Fulfill the Promise, then do something, catch errors if they occur and finally do something.

I am fine if you prefer to keep .then. This PR can be declined in that case.

@ikmrgrv
Copy link
Author

ikmrgrv commented Aug 18, 2019

So, what's the final call on this PR ??
Should I delete this if we are not going to merge it ??

Pardon me for silly questions. This is my first time contributions so I am not aware of the flow.

@chinesedfan
Copy link
Collaborator

@ikmrgrv You can close it by yourself. Remind you that keeping using then is not due to someone's preference. It is because finally is not included in the standard specification of Promise. As the cookbook said, people need add a shim to make sure it works.

@ikmrgrv
Copy link
Author

ikmrgrv commented Aug 26, 2019

@ikmrgrv You can close it by yourself. Remind you that keeping using then is not due to someone's preference. It is because finally is not included in the standard specification of Promise. As the cookbook said, people need add a shim to make sure it works.

Thanks

@ikmrgrv ikmrgrv closed this Aug 26, 2019
This was referenced Dec 8, 2019
@axios axios locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants