diff --git a/src/components/FrameRenderer/renderer.js b/src/components/FrameRenderer/renderer.js index a5eb3ffc2..4c2daf87a 100644 --- a/src/components/FrameRenderer/renderer.js +++ b/src/components/FrameRenderer/renderer.js @@ -44,7 +44,7 @@ export class Renderer { return true; } - async markToggleDone() { + async topicToggleDone() { const { response, error } = await getUserResourceProgressApi({ resourceId: this.resourceId, resourceType: this.resourceType, @@ -102,7 +102,7 @@ export class Renderer { this.containerEl.innerHTML = `
${message}
`; }), - this.markToggleDone(), + this.topicToggleDone(), ]); } diff --git a/src/components/TopicOverlay/topic.js b/src/components/TopicOverlay/topic.js index 6e368c683..02b6c7cd2 100644 --- a/src/components/TopicOverlay/topic.js +++ b/src/components/TopicOverlay/topic.js @@ -113,7 +113,7 @@ export class Topic { isTopicDone(topicId) { const normalizedGroup = topicId.replace(/^\d+-/, ''); - const el = document.querySelector(`[data-group-id="${normalizedGroup}"]`); + const el = document.querySelector(`[data-group-id$="-${normalizedGroup}"]`); return el?.classList.contains('done'); }