mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 06:22:20 +00:00
Bug 1684195 - Avoid and ignore Card errored image loading "uncaught exception: Object" r=thecount
Differential Revision: https://phabricator.services.mozilla.com/D110956
This commit is contained in:
parent
a6a94c7a07
commit
e27a099a1d
@ -64,7 +64,12 @@ export class _Card extends React.PureComponent {
|
||||
}
|
||||
|
||||
// Wait for the image whether just started loading or reused promise
|
||||
await gImageLoading.get(imageUrl);
|
||||
try {
|
||||
await gImageLoading.get(imageUrl);
|
||||
} catch (ex) {
|
||||
// Ignore the failed image without changing state
|
||||
return;
|
||||
}
|
||||
|
||||
// Only update state if we're still waiting to load the original image
|
||||
if (
|
||||
|
@ -7727,7 +7727,13 @@ class _Card extends react__WEBPACK_IMPORTED_MODULE_5___default.a.PureComponent {
|
||||
} // Wait for the image whether just started loading or reused promise
|
||||
|
||||
|
||||
await gImageLoading.get(imageUrl); // Only update state if we're still waiting to load the original image
|
||||
try {
|
||||
await gImageLoading.get(imageUrl);
|
||||
} catch (ex) {
|
||||
// Ignore the failed image without changing state
|
||||
return;
|
||||
} // Only update state if we're still waiting to load the original image
|
||||
|
||||
|
||||
if (content_src_lib_screenshot_utils__WEBPACK_IMPORTED_MODULE_6__["ScreenshotUtils"].isRemoteImageLocal(this.state.cardImage, this.props.link.image) && !this.state.imageLoaded) {
|
||||
this.setState({
|
||||
|
Loading…
x
Reference in New Issue
Block a user