enable() was called before invoke(“version”) resolved, so the first checkNewVersion() could run while sanitizedCurrentVersion was still undefined. Even though newVersion is a derived value, Svelte 5 may not reliably recompute it when state changes asynchronously on a module-level class instance.
Moving enable() inside the invoke callback ensures sanitizedCurrentVersion is always set before any version comparison runs.
enable() was called before invoke(“version”) resolved, so the first checkNewVersion() could run while sanitizedCurrentVersion was still undefined. Even though newVersion is a derived value, Svelte 5 may not reliably recompute it when state changes asynchronously on a module-level class instance.
Moving enable() inside the invoke callback ensures sanitizedCurrentVersion is always set before any version comparison runs.
Rebase