diff --git a/src/app/components/content/IsaacCoordinateQuestion.tsx b/src/app/components/content/IsaacCoordinateQuestion.tsx index 95f2217068..d800d11745 100644 --- a/src/app/components/content/IsaacCoordinateQuestion.tsx +++ b/src/app/components/content/IsaacCoordinateQuestion.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect} from "react"; +import React, {useCallback} from "react"; import {IsaacContentValueOrChildren} from "./IsaacContentValueOrChildren"; import {CoordinateChoiceDTO, CoordinateItemDTO, IsaacCoordinateQuestionDTO} from "../../../IsaacApiTypes"; import {Button, Input} from "reactstrap"; @@ -121,12 +121,6 @@ const IsaacCoordinateQuestion = ({doc, questionId, readonly}: IsaacQuestionProps return {type: "coordinateItem", coordinates: Array(numberOfDimensions).fill("")}; }, [numberOfDimensions]); - useEffect(() => { - if (!isDefined(currentAttempt)) { - dispatchSetCurrentAttempt({type: "coordinateChoice", items: [getEmptyCoordItem()]}); - } - }, [dispatchSetCurrentAttempt, currentAttempt, getEmptyCoordItem]); - const updateItem = useCallback((index: number, value: Immutable) => { const items = [...(currentAttempt?.items ?? [])].map(item => isDefined(item) ? cleanItem(item) : getEmptyCoordItem()); items[index] = cleanItem(value);