Skip to content
Snippets Groups Projects
Commit 4fc6a993 authored by lehtint6's avatar lehtint6
Browse files

Prevent grader of clicking null

parent 8917e36d
Branches
No related tags found
No related merge requests found
...@@ -598,9 +598,11 @@ let Content = { ...@@ -598,9 +598,11 @@ let Content = {
let p = 0; let p = 0;
['C4', 'D4', 'D#4', 'C#4', 'E4'].forEach(function (id) { ['C4', 'D4', 'D#4', 'C#4', 'E4'].forEach(function (id) {
let b = doc.getElementById(id); let b = doc.getElementById(id);
if (b) {
b.click(); b.click();
p += b.classList.contains('last-played') ? 1 : 0; p += b.classList.contains('last-played') ? 1 : 0;
p += doc.querySelectorAll('.last-played').length == 1 ? 1 : 0; p += doc.querySelectorAll('.last-played').length == 1 ? 1 : 0;
}
}); });
return { points: p }; return { points: p };
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment