@@ -72,21 +72,15 @@ export function query(validate_or_fn, maybe_fn) {
72
72
73
73
const { event, state } = get_request_store ( ) ;
74
74
75
- const abort_controller = new AbortController ( ) ;
76
75
/** @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 )
83
78
) ;
84
79
85
80
promise . catch ( ( ) => { } ) ;
86
81
87
82
/** @param {Output } value */
88
83
promise . set = ( value ) => {
89
- abort_controller . abort ( ) ;
90
84
const { state } = get_request_store ( ) ;
91
85
const refreshes = state . refreshes ;
92
86
@@ -97,7 +91,7 @@ export function query(validate_or_fn, maybe_fn) {
97
91
}
98
92
99
93
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 ) ;
101
95
} ;
102
96
103
97
promise . refresh = ( ) => {
@@ -118,7 +112,6 @@ export function query(validate_or_fn, maybe_fn) {
118
112
} ;
119
113
120
114
promise . withOverride = ( ) => {
121
- abort_controller . abort ( ) ;
122
115
throw new Error ( `Cannot call '${ __ . name } .withOverride()' on the server` ) ;
123
116
} ;
124
117
0 commit comments