diff --git a/frontend/src/features/vault/components/CategoryManager.tsx b/frontend/src/features/vault/components/CategoryManager.tsx index f94c162..c1ff607 100644 --- a/frontend/src/features/vault/components/CategoryManager.tsx +++ b/frontend/src/features/vault/components/CategoryManager.tsx @@ -825,7 +825,7 @@ const OrganizationModal: React.FC = ({ ) : (
- {newOrg.name ? newOrg.name.charAt(0).toUpperCase() : '?'} + {newOrg.name ? newOrg.name[0].toUpperCase() : '?'}
)} diff --git a/frontend/src/features/vault/components/OrganizationCard.tsx b/frontend/src/features/vault/components/OrganizationCard.tsx index 2b9d3dc..68a89b1 100644 --- a/frontend/src/features/vault/components/OrganizationCard.tsx +++ b/frontend/src/features/vault/components/OrganizationCard.tsx @@ -186,7 +186,7 @@ const OrganizationCard: React.FC = ({ org, onDelete, onEd // Fallback: First letter
- {org.name.charAt(0).toUpperCase()} + {org.name[0].toUpperCase()}
)} diff --git a/frontend/src/features/vault/components/VaultListItem.tsx b/frontend/src/features/vault/components/VaultListItem.tsx index 836d11e..bf2ec30 100644 --- a/frontend/src/features/vault/components/VaultListItem.tsx +++ b/frontend/src/features/vault/components/VaultListItem.tsx @@ -168,7 +168,7 @@ const VaultListItem: React.FC = ({ org, onClick, onEdit, onD ) : (
- {org.name.charAt(0).toUpperCase()} + {org.name[0].toUpperCase()}
)} diff --git a/frontend/src/features/vault/hooks/useExport.ts b/frontend/src/features/vault/hooks/useExport.ts index 6c294c0..b998be9 100644 --- a/frontend/src/features/vault/hooks/useExport.ts +++ b/frontend/src/features/vault/hooks/useExport.ts @@ -148,7 +148,7 @@ export function useExport(): UseExportReturn { */ const exportVault = useCallback(async (password: string, format: ExportFormat) => { // Validate inputs - if (!password || password.trim() === '') { + if (!password || password.trim().length === 0) { setError('Password is required'); setPhase('ERROR'); return; diff --git a/frontend/src/utils/encryption.ts b/frontend/src/utils/encryption.ts index 9cd0d47..64492b7 100644 --- a/frontend/src/utils/encryption.ts +++ b/frontend/src/utils/encryption.ts @@ -128,7 +128,7 @@ export async function encryptData( plaintext: string, key: CryptoKey ): Promise<{ iv: string; ciphertext: string }> { - if (!plaintext || plaintext.trim() === '') { + if (!plaintext || plaintext.trim().length === 0) { throw new Error('Cannot encrypt empty data'); }