Skip to content

Commit

Permalink
Fix #10506 fixed wrong parameter initialization (#10538)
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 committed Sep 11, 2024
1 parent f88dbf9 commit d3937c6
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 d3937c6

Please sign in to comment.