diff --git a/extension/src/vault/vault.ts b/extension/src/vault/vault.ts index a651d03..32f4d0d 100644 --- a/extension/src/vault/vault.ts +++ b/extension/src/vault/vault.ts @@ -448,8 +448,10 @@ function renderPane(): void { } break; case 'add': - // Sync newType from hash for the item-form component - state.newType = (route.type as ItemType) ?? null; + // Prefer hash type for deep-links; otherwise keep the in-memory value + // set by the type-selection click handler (which calls setState → + // renderPane before the URL hash has been updated to include the type). + state.newType = (route.type as ItemType) ?? state.newType ?? null; renderItemForm(pane, 'add'); break; case 'edit':