From fe0bd80f430bb63c8662fced8f55baa48d4cae11 Mon Sep 17 00:00:00 2001 From: shuaiplus <2327005759@qq.com> Date: Tue, 24 Mar 2026 00:56:56 +0800 Subject: [PATCH] feat: improve handling of archived timestamps in cipher storage normalization --- src/handlers/ciphers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/handlers/ciphers.ts b/src/handlers/ciphers.ts index d234db2..a934a65 100644 --- a/src/handlers/ciphers.ts +++ b/src/handlers/ciphers.ts @@ -47,7 +47,10 @@ function syncCipherComputedAliases(cipher: Cipher): Cipher { function normalizeCipherForStorage(cipher: Cipher): Cipher { cipher.login = normalizeCipherLoginForStorage(cipher.login); cipher.sshKey = normalizeCipherSshKeyForCompatibility(cipher.sshKey); - cipher.archivedAt = normalizeCipherTimestamp(cipher.archivedAt ?? cipher.archivedDate) ?? null; + const hasArchivedAt = Object.prototype.hasOwnProperty.call(cipher as object, 'archivedAt'); + cipher.archivedAt = hasArchivedAt + ? normalizeCipherTimestamp(cipher.archivedAt) ?? null + : normalizeCipherTimestamp(cipher.archivedDate) ?? null; return syncCipherComputedAliases(cipher); }