Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to set properties of null, when binded state becomes isn't avialable under condition #15008

Closed
Plikard opened this issue Jan 14, 2025 · 0 comments · Fixed by #15013
Closed

Comments

@Plikard
Copy link

Plikard commented Jan 14, 2025

Describe the bug

When playing audio HTML element with binded currentTime value becomes hidden, the Svelte still tries to set the value of the now missing property, which results in an error Cannot set properties of null.

Reproduction

Full example here: REPL

Press play and then hide the player. This error does not appear in Firefox.

Short version:

{#if player.playingAudio}
      <audio
            src={player.playingAudio.url}
            bind:currentTime={player.playingAudio.currentTime}
      ></audio>
{/if}

Logs

System Info

Chrome 131

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant