Skip to content

Commit e3a4500

Browse files
committed
Simplify the code
1 parent e0e966d commit e3a4500

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/tutorial/TutorialWindow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ function FloatingWindow({
193193
if (tutorialData.tutorialStep) {
194194
const saved = tutorialData.scrollPositions[tutorialData.tutorialStep];
195195
if (saved && scrollRef.current) {
196-
scrollRef.current.scrollTop = parseInt(saved.toString(), 10);
196+
scrollRef.current.scrollTop = saved;
197197
}
198198
}
199199
}, [tutorialData]);

src/utils/getTutorialDataHandlers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function parseTutorialDataString(
2727
let jsonObj = {};
2828
if (tutorialData) {
2929
try {
30+
// TODO: use a zod schema to validate this data
3031
jsonObj = JSON.parse(tutorialData);
3132
} catch (e) {
3233
console.error("Error parsing tutorial data from cookie:", e);

0 commit comments

Comments
 (0)