From a02c6fa6b901a89b16763ba4fe4a6ba9ee994eb3 Mon Sep 17 00:00:00 2001 From: "Matteo V." Date: Wed, 11 Sep 2024 18:28:51 +0200 Subject: [PATCH] Fix #10506 fixed wrong parameter initialization (#10538) (#10540) --- web/client/components/misc/SecureImage.jsx | 6 +++++- web/client/plugins/TOC/components/Legend.jsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/web/client/components/misc/SecureImage.jsx b/web/client/components/misc/SecureImage.jsx index dc6bc3810d..649031d18c 100644 --- a/web/client/components/misc/SecureImage.jsx +++ b/web/client/components/misc/SecureImage.jsx @@ -57,7 +57,11 @@ const SecureImage = ({ return ( {alt} { + if (imageSrc) { + props.onImgError(e); + } + }} onLoad={(e) => validateImg(e.target)} src={imageSrc} style={props.style} diff --git a/web/client/plugins/TOC/components/Legend.jsx b/web/client/plugins/TOC/components/Legend.jsx index 4274a356b8..9646c8c71a 100644 --- a/web/client/plugins/TOC/components/Legend.jsx +++ b/web/client/plugins/TOC/components/Legend.jsx @@ -121,7 +121,7 @@ class Legend extends React.Component { const url = this.getUrl(this.props); return ( this.validateImg(e.target)} src={url} style={this.props.style}