|
|
@ -146,10 +146,6 @@ export function async_derived(fn, location) {
|
|
|
|
const handler = (value, error = undefined) => {
|
|
|
|
const handler = (value, error = undefined) => {
|
|
|
|
prev = null;
|
|
|
|
prev = null;
|
|
|
|
|
|
|
|
|
|
|
|
if ((parent.f & DESTROYED) !== 0) {
|
|
|
|
|
|
|
|
batch.neuter();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
current_async_effect = null;
|
|
|
|
current_async_effect = null;
|
|
|
|
|
|
|
|
|
|
|
|
if (!pending) batch.activate();
|
|
|
|
if (!pending) batch.activate();
|
|
|
@ -187,6 +183,12 @@ export function async_derived(fn, location) {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
promise.then(handler, (e) => handler(null, e || 'unknown'));
|
|
|
|
promise.then(handler, (e) => handler(null, e || 'unknown'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (batch) {
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
|
|
|
|
queueMicrotask(() => batch.neuter());
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (DEV) {
|
|
|
|
if (DEV) {
|
|
|
|