File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
packages/kit/src/runtime/client Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @sveltejs/kit ' : patch
3+ ---
4+
5+ fix: avoid creating update check timer on the server
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ export function client_method(key) {
4444}
4545
4646export const stores = {
47- url : notifiable_store ( { } ) ,
48- page : notifiable_store ( { } ) ,
49- navigating : writable ( /** @type {import('types').Navigation | null } */ ( null ) ) ,
50- updated : create_updated_store ( )
47+ url : /* @__PURE__ */ notifiable_store ( { } ) ,
48+ page : /* @__PURE__ */ notifiable_store ( { } ) ,
49+ navigating : /* @__PURE__ */ writable ( /** @type {import('types').Navigation | null } */ ( null ) ) ,
50+ updated : /* @__PURE__ */ create_updated_store ( )
5151} ;
Original file line number Diff line number Diff line change @@ -219,15 +219,20 @@ export function notifiable_store(value) {
219219export function create_updated_store ( ) {
220220 const { set, subscribe } = writable ( false ) ;
221221
222+ if ( DEV || ! BROWSER ) {
223+ return {
224+ subscribe,
225+ check : async ( ) => false
226+ } ;
227+ }
228+
222229 const interval = __SVELTEKIT_APP_VERSION_POLL_INTERVAL__ ;
223230
224231 /** @type {NodeJS.Timeout } */
225232 let timeout ;
226233
227234 /** @type {() => Promise<boolean> } */
228235 async function check ( ) {
229- if ( DEV || ! BROWSER ) return false ;
230-
231236 clearTimeout ( timeout ) ;
232237
233238 if ( interval ) timeout = setTimeout ( check , interval ) ;
You can’t perform that action at this time.
0 commit comments