Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 7a1b1fc

Browse files
committed
Fix: use JSON from postgresql no parsing needed
1 parent e6959cb commit 7a1b1fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runestone/webwork/js/webwork.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class WebWork extends RunestoneBase {
2929
if (!data.answer) {
3030
data.answer = "";
3131
}
32-
// check:actual:3:expected:3:actual:1:expected:1:actual:3:expected:3:actual:1:expected:1:correct:4:count:4:pct:1
33-
this.answers = JSON.parse(data.answer);
32+
// data.answers comes from postgresql as a JSON column type so no need to parse it.
33+
this.answers = data.answer;
3434
}
3535

3636
checkLocalStorage() {

0 commit comments

Comments
 (0)