fix: Add array check for process.states iteration
**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
This commit is contained in:
parent
8261e0533d
commit
4ec026e892
@ -554,10 +554,10 @@ async function handleMainPairing(): Promise<void> {
|
|||||||
if (mainStatus) {
|
if (mainStatus) {
|
||||||
mainStatus.innerHTML = '<div class="spinner"></div><span>Authenticating with browser...</span>';
|
mainStatus.innerHTML = '<div class="spinner"></div><span>Authenticating with browser...</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will trigger the WebAuthn flow and create/decrypt credentials
|
// This will trigger the WebAuthn flow and create/decrypt credentials
|
||||||
await prepareAndSendPairingTx();
|
await prepareAndSendPairingTx();
|
||||||
|
|
||||||
if (mainStatus) {
|
if (mainStatus) {
|
||||||
mainStatus.innerHTML = '<span style="color: var(--success-color)">✅ Authentication completed successfully</span>';
|
mainStatus.innerHTML = '<span style="color: var(--success-color)">✅ Authentication completed successfully</span>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user