From 3cb0ca38ec0b6caa22539453b4b44df887baa6c2 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Thu, 22 Feb 2024 18:40:38 +0530 Subject: [PATCH] fix: typecast BigInt to number in progress computation closes: https://github.com/mCaptcha/mCaptcha/issues/134 --- templates/widget/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/widget/index.ts b/templates/widget/index.ts index 142e7a2e..d40306e1 100644 --- a/templates/widget/index.ts +++ b/templates/widget/index.ts @@ -94,7 +94,7 @@ export const solveCaptchaRunner = async (e: Event): Promise => { } if (resp.type === "progress") { if (width < 80) { - width = (resp.nonce / max_recorded_nonce) * 100; + width = Number(resp.nonce / max_recorded_nonce) * 100; setWidth(width); } console.log(`received nonce ${resp.nonce}`);