202269ebeb
## Issue 4669: `Download doesn't trigger on web until 2nd attempt` The issue only happens when _Autoplay_ is disabled in the User Settings and the video hasn't been loaded when _Download_ is clicked. The following code: `if (didClickDownloadButton && streamingUrl)` didn't triggered because: 1. `streamingUrl` has not resolved yet when the Effect ran. 2. When it did resolve, the parent component was also notified and unmounted things, causing `didClickDownloadButton` to reset. ## Approach Avoid the unnecessary unmounting by not using a conditional section wrapper within a return statement. React probably couldn't do the diffs when the conditional is at a section level. |
||
---|---|---|
.. | ||
index.js | ||
view.jsx |