Skip to content

Commit fc5f8db

Browse files
InfantLabclaude
andcommitted
fix: What's New overlay reappearing despite dismissal
The appVersion was read via a fragile cast chain that could resolve to '0.0.0' at runtime, so acknowledgeNewVersion() saved the wrong version string and the overlay reappeared on every page load. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 305495a commit fc5f8db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/composables/useOnboarding.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function saveState() {
7171

7272
export function useOnboarding() {
7373
const config = useRuntimeConfig();
74-
const currentVersion = ((config as unknown as Record<string, Record<string, unknown>>)['public']!)['appVersion'] as string || "0.0.0";
74+
const currentVersion = String(config.public?.appVersion ?? "0.0.0");
7575

7676
// Initialize on mount — safe to call multiple times since all
7777
// instances share the same state ref

0 commit comments

Comments
 (0)