Skip to content

Commit 793cd94

Browse files
walterbenderWalter Bender
andauthored
fix regression with new save file type (#4715)
Co-authored-by: Walter Bender <[email protected]>
1 parent 8dea5c6 commit 793cd94

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

js/activity.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6479,9 +6479,15 @@ class Activity {
64796479
let obj;
64806480
try {
64816481
if (cleanData.includes("html")) {
6482-
obj = JSON.parse(
6483-
cleanData.match('<div class="code">(.+?)</div>')[1]
6484-
);
6482+
try {
6483+
obj = JSON.parse(
6484+
cleanData.match('<div class="code" id="codeBlock">(.+?)</div>')[1]
6485+
);
6486+
} catch (e) {
6487+
obj = JSON.parse(
6488+
cleanData.match('<div class="code">(.+?)</div>')[1]
6489+
);
6490+
}
64856491
} else {
64866492
obj = JSON.parse(cleanData);
64876493
}

0 commit comments

Comments
 (0)