mirror of
https://github.com/screentinker/screentinker.git
synced 2026-05-15 07:32:23 -06:00
The cached-playlist restore at the top of the script synchronously calls playCurrentItem -> renderContent -> createYoutubeEmbed, which references ytGeneration / activeYtPlayer / ytApiReady / ytApiCallbacks. Those were declared with `let` further down in the script, so the references hit the temporal dead zone and threw on every cold start with a YouTube item in the cached playlist: Uncaught ReferenceError: can't access lexical declaration 'ytGeneration' before initialization Hoisted the four declarations to the top of the script alongside the other player state. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| index.html | ||
| sw.js | ||