syntaxfm / website

Syntax Podcast Website
https://syntax.fm
MIT License
982 stars 493 forks source link

TypeError: Failed to set the 'currentTime' property on 'HTMLMediaElement': The provided double value is non-... #1736

Closed sentry-io[bot] closed 1 week ago

sentry-io[bot] commented 1 week ago

Sentry Issue: WEBSITE-151

TypeError: Failed to set the 'currentTime' property on 'HTMLMediaElement': The provided double value is non-finite.
  at fn (../../../../../../src/state/player.ts:225:6)
  at <object>.update_time (../../../../../../src/state/player.ts:223:4)
  at handleClick (../../../../../../src/routes/(site)/show/[show_number]/[slug]/+layout.svelte:31:12)
wesbos commented 1 week ago

@stolinski looks like its trying to set a value that isn't a number

stolinski commented 1 week ago

See the line. time should always be a number here because of TS, but I'll figure out how that's happening.

stolinski commented 1 week ago

Wild. That method is only being called in two places, both are pretty firmly typed. On it.

wesbos commented 1 week ago

I think its probably realted to something like parseFloat(localStorage.get('whatever');

typeof parseFloat(undefined) === number // true