stop using javascript:void 0
as a placeholder
This commit is contained in:
parent
1237ed0bb2
commit
674107516c
1 changed files with 6 additions and 1 deletions
|
@ -135,7 +135,12 @@ function DownloadButton({ outfitState }) {
|
||||||
aria-label="Download"
|
aria-label="Download"
|
||||||
as="a"
|
as="a"
|
||||||
// eslint-disable-next-line no-script-url
|
// eslint-disable-next-line no-script-url
|
||||||
href={downloadImageUrl || "javascript:void 0"}
|
href={downloadImageUrl || "#"}
|
||||||
|
onClick={(e) => {
|
||||||
|
if (!downloadImageUrl) {
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}}
|
||||||
download={(outfitState.name || "Outfit") + ".png"}
|
download={(outfitState.name || "Outfit") + ".png"}
|
||||||
onMouseEnter={prepareDownload}
|
onMouseEnter={prepareDownload}
|
||||||
onFocus={prepareDownload}
|
onFocus={prepareDownload}
|
||||||
|
|
Loading…
Reference in a new issue