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

Broken with Firefox 77.0.1 #1

Closed
vegetabill opened this issue Jun 30, 2020 · 1 comment
Closed

Broken with Firefox 77.0.1 #1

vegetabill opened this issue Jun 30, 2020 · 1 comment

Comments

@vegetabill
Copy link
Owner

vegetabill commented Jun 30, 2020

Not sure if this regression is caused by Reddit API or Firefox container tabs. Doesn't show any photo. Console reports:

TypeError: NetworkError when attempting to fetch resource.       photo-tab.js:66:12
@vegetabill vegetabill changed the title Broken when container tabs enabled Broken with Firefox 77.0.1 Jun 30, 2020
@vegetabill
Copy link
Owner Author

Actual fix was catching network errors. Previously the code assume it might get a non-2xx HTTP status but not a network error:

.catch((err) => {
console.error(`Error looking up size of image at ${url}`, err);
});
})
).then((photos) => {
return photos.filter((p) => p && p.sizeInBytes < 6000000);

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

No branches or pull requests

1 participant