Skip to content

Commit

Permalink
fix: query selector for topics
Browse files Browse the repository at this point in the history
  • Loading branch information
arikchakma committed Apr 11, 2023
1 parent a9d70f6 commit a730c81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/FrameRenderer/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class Renderer {
return true;
}

async markToggleDone() {
async topicToggleDone() {
const { response, error } = await getUserResourceProgressApi({
resourceId: this.resourceId,
resourceType: this.resourceType,
Expand Down Expand Up @@ -102,7 +102,7 @@ export class Renderer {

this.containerEl.innerHTML = `<div class="error py-5 text-center text-red-600 mx-auto">${message}</div>`;
}),
this.markToggleDone(),
this.topicToggleDone(),
]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/TopicOverlay/topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit a730c81

Please sign in to comment.