Skip to content

Commit

Permalink
deploy: bb2b1bd
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Sep 12, 2024
1 parent d76607e commit 6eb4e71
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions quiz/quiz-embed.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -50479,7 +50479,7 @@ ${question.context}` })
React.createElement("div", { style: { display: expanded ? "block" : "none" } }, "We want to know how much you are learning that can be recalled without assistance. Please complete the quiz without re-reading the text, e.g. by opening it in another tab.")
);
};
let loadState = ({ quiz, answerStorage, cacheAnswers }) => {
let loadState = ({ quiz, answerStorage, cacheAnswers, autoStart }) => {
let stored = answerStorage.load();
let badSchema = stored && stored.attempt > 0 && !stored.confirmedDone && !stored.wrongAnswers;
if (cacheAnswers && stored && !badSchema) {
Expand All @@ -50494,7 +50494,7 @@ ${question.context}` })
};
} else {
return {
started: false,
started: autoStart || false,
index: 0,
attempt: 0,
confirmedDone: false,
Expand Down Expand Up @@ -50629,7 +50629,8 @@ ${question.context}` })
let state = useLocalObservable(() => loadState({
quiz: config.quiz,
answerStorage,
cacheAnswers: config.cacheAnswers
cacheAnswers: config.cacheAnswers,
autoStart: config.autoStart
}));
let saveToCache = () => {
if (config.cacheAnswers)
Expand Down

0 comments on commit 6eb4e71

Please sign in to comment.