1 parent e0e966d commit e3a4500Copy full SHA for e3a4500
2 files changed
src/components/tutorial/TutorialWindow.tsx
@@ -193,7 +193,7 @@ function FloatingWindow({
193
if (tutorialData.tutorialStep) {
194
const saved = tutorialData.scrollPositions[tutorialData.tutorialStep];
195
if (saved && scrollRef.current) {
196
- scrollRef.current.scrollTop = parseInt(saved.toString(), 10);
+ scrollRef.current.scrollTop = saved;
197
}
198
199
}, [tutorialData]);
src/utils/getTutorialDataHandlers.ts
@@ -27,6 +27,7 @@ function parseTutorialDataString(
27
let jsonObj = {};
28
if (tutorialData) {
29
try {
30
+ // TODO: use a zod schema to validate this data
31
jsonObj = JSON.parse(tutorialData);
32
} catch (e) {
33
console.error("Error parsing tutorial data from cookie:", e);
0 commit comments