-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fetch API を使う #118
Merged
Merged
Fetch API を使う #118
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yumetodo
reviewed
Jan 25, 2020
js/common.js
Outdated
} | ||
} catch (err) { | ||
console.error(err); | ||
return Promise.resolve(null); // Promise.all() が reject されないように 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.
単にnull
を返せませんでしたっけ?
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.
( reject ではなく) resolve してるんだぞ、ということを明示的に主張したかったのでこう書きました。
冗長と感じるなら消します
Merged
#119 を見てください |
fetchJsonAndCheckの導入など
ネットワークエラーでも null が resolve されるようになったため refs #119 (comment)
yumetodo
approved these changes
Jan 26, 2020
sasanquaneuf
approved these changes
Jan 26, 2020
🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
XMLHttpRequest の処理を Fetch API で書き換えました
副産物として、まとめからのインポート処理が非同期で読み込まれるようになりました。
読み込み時間は前よりかは時間がかからなくなったと思います
refs #3
テストのときに使ってたサンプルまとめ
https://qithub-bot.github.io/mastogetter/p.html?i=https://qiitadon.com&t=0_1,0_2,0_3,0_4,0_5,0_6,0_7,0_8,0_9,0_a,0_b,0_c,0_d,0_e,0_f,0_g,0_h,0_i,0_j,0_k,0_l,0_m,0_n,0_o,0_p,0_q,0_r,0_s,0_t,0_u,0_v,0_w,0_x,0_y,0_z,0_10