wrap in async derived instead of derived

pull/16463/head
ComputerGuy 2 months ago
parent d9db9e3dc2
commit 69f1ed84bc

@ -291,6 +291,9 @@ export function should_proxy(node, scope) {
* @param {ComponentClientTransformState} state
* @param {Expression} arg
*/
export function create_derived(state, arg) {
return b.call(state.analysis.runes ? '$.derived' : '$.derived_safe_equal', arg);
export function create_derived(state, arg, async = false) {
return b.call(
state.analysis.runes ? `$.${async ? 'async_' : ''}derived` : '$.derived_safe_equal',
arg
);
}

Loading…
Cancel
Save