Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(website): no star prompt when nothing was downloaded

EtienneLescotd951e532b35f
diff --git a/website/src/pages/download.tsx b/website/src/pages/download.tsx
index 4b97b01ff..d3e266f70 100644
--- a/website/src/pages/download.tsx
+++ b/website/src/pages/download.tsx
@@ -323,10 +323,15 @@ export default function DownloadPage() {
className={styles.option}
href={href ?? asset?.url ?? LATEST_URL}
// No preventDefault: the click keeps its default navigation to the
- // asset and the download starts as it always did. A set `href` is
- // the Store listing, which leaves the site — prompting there would
- // render behind a page the user has already left.
- onClick={href ? undefined : () => setStartedId(id)}
+ // asset and the download starts as it always did.
+ //
+ // Two cases get no prompt, for the same reason: nothing downloaded
+ // and the page is gone. A set `href` is the Store listing, and a
+ // missing `asset?.url` means the build-time lookup came back empty
+ // and this link falls through to the releases page. Both navigate
+ // away, so the prompt would render behind a page the user has
+ // already left.
+ onClick={href || !asset?.url ? undefined : () => setStartedId(id)}
>
<span className={styles.optionText}>
<span className={styles.optionLabel}>{label}</span>