@@ -72,21 +72,15 @@ export function query(validate_or_fn, maybe_fn) {
7272
7373 const { event, state } = get_request_store ( ) ;
7474
75- const abort_controller = new AbortController ( ) ;
7675 /** @type {Promise<any> & Partial<RemoteQuery<any>> } */
77- const promise = get_response (
78- __ . id ,
79- arg ,
80- state ,
81- ( ) => run_remote_function ( event , state , false , arg , validate , fn ) ,
82- abort_controller . signal
76+ const promise = get_response ( __ . id , arg , state , ( ) =>
77+ run_remote_function ( event , state , false , arg , validate , fn )
8378 ) ;
8479
8580 promise . catch ( ( ) => { } ) ;
8681
8782 /** @param {Output } value */
8883 promise . set = ( value ) => {
89- abort_controller . abort ( ) ;
9084 const { state } = get_request_store ( ) ;
9185 const refreshes = state . refreshes ;
9286
@@ -97,7 +91,7 @@ export function query(validate_or_fn, maybe_fn) {
9791 }
9892
9993 const cache_key = create_remote_cache_key ( __ . id , stringify_remote_arg ( arg , state . transport ) ) ;
100- refreshes [ cache_key ] = Promise . resolve ( value ) ;
94+ refreshes [ cache_key ] = ( state . remote_data ??= { } ) [ cache_key ] = Promise . resolve ( value ) ;
10195 } ;
10296
10397 promise . refresh = ( ) => {
@@ -118,7 +112,6 @@ export function query(validate_or_fn, maybe_fn) {
118112 } ;
119113
120114 promise . withOverride = ( ) => {
121- abort_controller . abort ( ) ;
122115 throw new Error ( `Cannot call '${ __ . name } .withOverride()' on the server` ) ;
123116 } ;
124117
0 commit comments