You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consttracer=get_tracer({is_enabled: true});// TODO: Make this configurable
76
74
77
-
if(DEV&&done&&!uses.dependencies.has(url.href)){
78
-
console.warn(
79
-
`${node.server_id}: Calling \`event.fetch(...)\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when the dependency is invalidated`
80
-
);
81
-
}
82
-
83
-
// Note: server fetches are not added to uses.depends due to security concerns
`${node.server_id}: Calling \`depends(...)\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when the dependency is invalidated`
92
+
`${node.server_id}: Calling \`event.fetch(...)\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when the dependency is invalidated`
)}\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when the param changes`
111
-
);
112
-
}
113
95
114
-
if(is_tracking){
115
-
uses.params.add(key);
116
-
}
117
-
returntarget[/** @type {string} */(key)];
118
-
}
119
-
}),
120
-
parent: async()=>{
121
-
if(DEV&&done&&!uses.parent){
122
-
console.warn(
123
-
`${node.server_id}: Calling \`parent(...)\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when parent data changes`
124
-
);
125
-
}
96
+
// Note: server fetches are not added to uses.depends due to security concerns
`${node.server_id}: Calling \`depends(...)\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when the dependency is invalidated`
)}\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when the param changes`
124
+
);
125
+
}
126
+
127
+
if(is_tracking){
128
+
uses.params.add(key);
129
+
}
130
+
returntarget[/** @type {string} */(key)];
131
+
}
132
+
}),
133
+
parent: async()=>{
134
+
if(DEV&&done&&!uses.parent){
135
+
console.warn(
136
+
`${node.server_id}: Calling \`parent(...)\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when parent data changes`
137
+
);
138
+
}
126
139
127
-
if(is_tracking){
128
-
uses.parent=true;
129
-
}
130
-
returnparent();
131
-
},
132
-
route: newProxy(event.route,{
133
-
get: (target,key)=>{
134
-
if(DEV&&done&&typeofkey==='string'&&!uses.route){
135
-
console.warn(
136
-
`${node.server_id}: Accessing \`route.${String(
137
-
key
138
-
)}\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when the route changes`
139
-
);
140
+
if(is_tracking){
141
+
uses.parent=true;
142
+
}
143
+
returnparent();
144
+
},
145
+
route: newProxy(event.route,{
146
+
get: (target,key)=>{
147
+
if(DEV&&done&&typeofkey==='string'&&!uses.route){
148
+
console.warn(
149
+
`${node.server_id}: Accessing \`route.${String(
150
+
key
151
+
)}\` in a promise handler after \`load(...)\` has returned will not cause the function to re-run when the route changes`
152
+
);
153
+
}
154
+
155
+
if(is_tracking){
156
+
uses.route=true;
157
+
}
158
+
returntarget[/** @type {'id'} */(key)];
159
+
}
160
+
}),
161
+
url,
162
+
untrack(fn){
163
+
is_tracking=false;
164
+
try{
165
+
returnfn();
166
+
}finally{
167
+
is_tracking=true;
168
+
}
140
169
}
170
+
})
171
+
);
141
172
142
-
if(is_tracking){
143
-
uses.route=true;
144
-
}
145
-
returntarget[/** @type {'id'} */(key)];
146
-
}
147
-
}),
148
-
url,
149
-
untrack(fn){
150
-
is_tracking=false;
151
-
try{
152
-
returnfn();
153
-
}finally{
154
-
is_tracking=true;
155
-
}
156
-
}
157
-
})
158
-
);
173
+
returnresult;
174
+
}
175
+
});
159
176
160
177
if(__SVELTEKIT_DEV__){
161
178
validate_load_response(result,node.server_id);
@@ -201,16 +218,34 @@ export async function load_data({
0 commit comments