From b6f35cf96aa6da5e2c7a45d9255244980284b327 Mon Sep 17 00:00:00 2001 From: Levhita Date: Wed, 25 Jun 2025 13:50:53 -0600 Subject: [PATCH] correct way to handle processid --- main.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 1454417..b27ae0c 100644 --- a/main.js +++ b/main.js @@ -72,11 +72,13 @@ function captureId() { // 5.- Process the ID async function processId() { - const results = await incode.processId({ - token: incodeSession.token, - }); - console.log("processId results", results); - captureSelfie(); + return incode.processId({ token: incodeSession.token }) + .then(() => { + captureSelfie(); + }) + .catch((error) => { + showError(error); + }); } // 6.- Capture the selfie