Conversation
Member
Author
|
Ready for testing now. 👍 |
Member
|
Very cool and seems to work great. |
Member
Member
Author
|
Somehow it probably got to make two fetches before one was complete since there’s already a |
Member
|
I couldn't reproduce it when I did another PR, so probably some kind of obscure race condition indeed. |
+ Prevent quick repeated executions from piling up
Member
Author
|
That should do it. I just cache the entire |
Member
|
Can you add it to the readme? |
sindresorhus
approved these changes
Nov 8, 2017
Member
|
@bfred-it I guess its not intended to work on private repo's right? |
Member
Author
|
You're 20 minutes too late! I think I was just missing |
Member
|
@bfred-it I don't normally test the pr's unless I reported the issue |
Member
Author
|
Done in 04d32b7 |
sindresorhus
reviewed
Nov 8, 2017
|
|
||
| async function fetchStatus() { | ||
| const url = `${location.origin}/${getRepoURL()}/commits/`; | ||
| const dom = await fetch(url).then(r => r.text()).then(domify); |
Member
There was a problem hiding this comment.
@bfred-it This could be:
const response = await fetch(url);
const dom = domify(await response.text());And here too:
src/content.js
88: domLoaded.then(onDomReady);
src/libs/synchronous-storage.js
30: return get().then(value => {
src/libs/utils.js
36: domLoaded.then(() => requestAnimationFrame(() => waiting.cancel()));
src/libs/api.js
3: return fetch(api + endpoint).then(res => res.json());
src/features/linkify-branch-refs.js
33: safeElementReady('.branch-name').then(el => {
src/features/show-names.js
16: .then(res => res.text());
src/features/show-recently-pushed-branches.js
18: }).then(res => res.text());
src/features/mark-unread.js
335: }).then(storage => storage.unreadNotifications);
src/features/move-account-switcher-to-sidebar.js
5: safeElementReady('.dashboard-sidebar').then(sidebar => {
This file contains hidden or 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
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.


Notes:
Testable pages:
Fixes #726