I don't know the exact circumstances, but I'm getting errors because resultEqualityCheck gets a WeakRef instead of the expected Set:
Looks like the WeakRef is "cleared":
So this line would still keep the WeakRef in lastResultValue:
const lastResultValue = lastResult?.deref?.() ?? lastResult
Should better be:
const lastResultValue = lastResult?.deref ? lastResult.deref() : lastResult
I don't know the exact circumstances, but I'm getting errors because
resultEqualityCheckgets aWeakRefinstead of the expectedSet:Looks like the WeakRef is "cleared":
So this line would still keep the
WeakRefinlastResultValue:Should better be: