Skip to content

Commit 97f0582

Browse files
authored
fix: type prehydrate settings as AppSettings (npmx-dev#1430)
1 parent 3d06131 commit 97f0582

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/utils/prehydrate.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ export function initPreferencesOnPrehydrate() {
1616
const validPMs = new Set(['npm', 'pnpm', 'yarn', 'bun', 'deno', 'vlt'])
1717

1818
// Read settings from localStorage
19-
const settings = JSON.parse(localStorage.getItem('npmx-settings') || '{}')
19+
const settings = JSON.parse(
20+
localStorage.getItem('npmx-settings') || '{}',
21+
) as Partial<AppSettings>
2022

2123
const accentColorId = settings.accentColorId
2224
if (accentColorId && accentColorIds.has(accentColorId)) {

0 commit comments

Comments
 (0)