-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Closed as not planned
Copy link
Description
Describe the bug
Another bug related to #16381
import { untrack } from 'svelte'
let name = $state('a')
let count = $state(1)
const wait = () => new Promise((resolve) => {
setTimeout(resolve, 1000)
})
const promise = Promise.resolve(1)
const getData = async () => {
await promise
await wait()
// This causes false positive
if (name === 'a') {
}
return count
}
let countAsync = $derived.by(() => {
return untrack(() => getData())
});Reproduction
Logs
System Info
Svelte 5.36.7Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels