Use current target

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-13 09:18:34 +02:00
parent bdbd03c4ff
commit fa4977c4da
No known key found for this signature in database
GPG key ID: 9760693FDD98A790

View file

@ -144,7 +144,7 @@ export default class MImageBody extends React.Component<IProps, IState> {
if (!this.state.showImage || !this.isGif() || SettingsStore.getValue("autoplayGifsAndVideos")) { if (!this.state.showImage || !this.isGif() || SettingsStore.getValue("autoplayGifsAndVideos")) {
return; return;
} }
const imgElement = e.target as HTMLImageElement; const imgElement = e.currentTarget;
imgElement.src = this.getContentUrl(); imgElement.src = this.getContentUrl();
}; };