-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Labels
Description
Describe the problem
When setting state with NaN it causes an update even though NaN is the same value as before.
<script>
let x = $state(NaN);
</script>
<button onclick={() => {
x = NaN
}}>Set NaN</button>
{#key x}
<iframe title="Svelte" src="https://svelte.dev"></iframe>
{/key}Describe the proposed solution
Svelte should either switch to using Object.is for default equality or it should provide a way of supplying a custom equals function.
Importance
would make my life easier