Solved a bug with the WriteBlanks warning
This commit is contained in:
@@ -27,8 +27,8 @@ function Blank({
|
||||
const [userInput, setUserInput] = useState(userSolution || "");
|
||||
|
||||
useEffect(() => {
|
||||
const words = userInput.split(" ").filter((x) => x !== "");
|
||||
if (words.length >= maxWords) {
|
||||
const words = userInput.split(" ");
|
||||
if (words.length > maxWords) {
|
||||
toast.warning(`You have reached your word limit of ${maxWords} words!`, {toastId: "word-limit"});
|
||||
setUserInput(words.join(" ").trim());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user