We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8546c0b commit 0813e43Copy full SHA for 0813e43
src/components/Quiz/useLocalQuizData.ts
@@ -17,8 +17,7 @@ export const useLocalQuizData = () => {
17
// `completed` value from a string to an object.
18
const [current, setCurrent] = data
19
if (typeof current.completed === "string") {
20
- const newCompleted = JSON.parse(current.completed)
21
- setCurrent({ ...current, completed: newCompleted })
+ setCurrent({ ...current, completed: JSON.parse(current.completed) })
22
}
23
24
return data
0 commit comments