From 7af1ced1a707e77c61037fcebe9e3baf81a217b6 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Tue, 17 Jun 2025 14:27:46 +0200 Subject: [PATCH] Improve signature parsing and updating logic --- src/pages/SystemView.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/SystemView.tsx b/src/pages/SystemView.tsx index a344613..54b1682 100644 --- a/src/pages/SystemView.tsx +++ b/src/pages/SystemView.tsx @@ -37,9 +37,11 @@ export const SystemView = () => { const updatedSignature: Pick = { updated: new Date().toISOString() } - if (existingRecord.type == "" && signature.type != "") + // Existing record has no type and our new signature has a type + if (!!!existingRecord.type && !!signature.type) updatedSignature.type = signature.type; - if (existingRecord.signame == "" && signature.signame != "") + // Existing record has no signame and our new signature has a signame + if (!!!existingRecord.signame && !!signature.signame) updatedSignature.signame = signature.signame; // Update existing signature only if new scan percentage is higher const existingScannedPercentage = parseScannedPercentage(existingRecord.scanned);