From ae08294a9e203df91127ac881a7230088aed0769 Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Mon, 8 Jul 2024 21:14:36 +0600 Subject: [PATCH] fix: topic id --- src/components/FrameRenderer/renderer.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/FrameRenderer/renderer.ts b/src/components/FrameRenderer/renderer.ts index ba4adb655..6f51f7ddf 100644 --- a/src/components/FrameRenderer/renderer.ts +++ b/src/components/FrameRenderer/renderer.ts @@ -152,6 +152,10 @@ export class Renderer { return; } + if (/^check:/.test(topicId)) { + topicId = topicId.replace('check:', ''); + } + pageProgressMessage.set('Updating progress'); updateResourceProgress( { @@ -190,9 +194,7 @@ export class Renderer { e.preventDefault(); const isCurrentStatusDone = targetGroup.classList.contains('done'); - const normalizedGroupId = groupId - .replace(/^\d+-/, '') - .replace('check:', ''); + const normalizedGroupId = groupId.replace(/^\d+-/, ''); if (normalizedGroupId.startsWith('ext_link:')) { return;