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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct heading in We Have a Problem with Promises #6746

Merged
merged 1 commit into from
Oct 30, 2017

Conversation

ScottFreeCode
Copy link
Contributor

We Have a Problem with Promises is still one of the best articles to send to folks struggling with promise idioms in the day of async/await (I just sent it to somebody who was fiddling with nested promise constructors and async/await, not because it addressed what they were doing directly but because the "do"s and "don't"s it discusses would give them better ways to structure their code, with or without the syntactic sugar of async). But every once in a while I see people stumble over the statement that "catch() is not exactly like then(null, ...)". What is the difference explained in the article? Well, actually, that statement's the heading to a section that starts by explaining that catch is exactly like then with null as the first callback parameter, then goes on to explain the difference between then followed by catch vs then with two callback parameters. And I just now realized I could submit a request on GitHub to make the heading reflect that!

I was ambivalent about possibly using even shorter code in the heading: then().catch() and then(..., ...) as was the style before (as I said in the commit, I thought about it in terms of the shortest possible restatement of the section's content); but I figure it's easier to take the names back out than to find what the handlers were named elsewhere in the article in order to add consistent names in (which is what I did).

Hope you like the suggestion! 馃樃

Advanced mistake 2 had an inaccurate (or at least misleading) summary of the section's content; now it's just the shortest possible restatement of the section's content.
@ScottFreeCode
Copy link
Contributor Author

...I really should have put [ci skip] in the commit message; sorry about that!

@daleharvey
Copy link
Member

Thats no bother, we are having some issues with out CI, thanks for this it looks great

@daleharvey daleharvey merged commit 04fbdf7 into pouchdb:master Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants