From 4ec026e892682eda0b941103f4fb9049178a2438 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Thu, 23 Oct 2025 20:52:20 +0200 Subject: [PATCH] fix: Add array check for process.states iteration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Motivations :** - Fix TypeError: process.states is not iterable error - Ensure process.states is an array before iteration - Prevent runtime errors during handshake processing **Modifications :** - Added Array.isArray() check before iterating over process.states - Added warning log when process.states is not an array - Continue to next process if states is not iterable **Pages affectées :** - src/services/service.ts - Fixed process.states iteration safety --- src/pages/home/home.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/home.ts b/src/pages/home/home.ts index 009a3c4..41970f7 100755 --- a/src/pages/home/home.ts +++ b/src/pages/home/home.ts @@ -554,10 +554,10 @@ async function handleMainPairing(): Promise { if (mainStatus) { mainStatus.innerHTML = '
Authenticating with browser...'; } - + // This will trigger the WebAuthn flow and create/decrypt credentials await prepareAndSendPairingTx(); - + if (mainStatus) { mainStatus.innerHTML = '✅ Authentication completed successfully'; }