Skip to content

Commit

Permalink
Fix #10506 fixed wrong parameter initialization (#10538) (#10540)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 authored Sep 11, 2024
1 parent f88dbf9 commit a02c6fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion web/client/components/misc/SecureImage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ const SecureImage = ({
return (
<img
alt={alt}
onError={props.onImgError}
onError={(e) => {
if (imageSrc) {
props.onImgError(e);
}
}}
onLoad={(e) => validateImg(e.target)}
src={imageSrc}
style={props.style}
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/TOC/components/Legend.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Legend extends React.Component {
const url = this.getUrl(this.props);
return (
<SecureImage
onError={this.onImgError}
onImgError={this.onImgError}
onLoad={(e) => this.validateImg(e.target)}
src={url}
style={this.props.style}
Expand Down

0 comments on commit a02c6fa

Please sign in to comment.