PE-150, error when image not found

This commit is contained in:
sawka 2023-09-16 13:01:38 -07:00
parent 975512d4eb
commit caa11748e5

View File

@ -61,8 +61,17 @@ class SimpleImageRenderer extends React.Component<
}
render() {
let dataBlob = this.props.data;
if (dataBlob == null || dataBlob.notFound) {
return (
<div className="renderer-container image-renderer" style={{ fontSize: this.props.opts.termFontSize }}>
<div className="load-error-text">
ERROR: file {dataBlob && dataBlob.name ? JSON.stringify(dataBlob.name) : ""} not found
</div>
</div>
);
}
if (this.objUrl == null) {
let dataBlob = this.props.data;
this.objUrl = URL.createObjectURL(dataBlob);
}
let opts = this.props.opts;