diff --git a/editor.planx.uk/src/@planx/components/MapAndLabel/Public/Context.tsx b/editor.planx.uk/src/@planx/components/MapAndLabel/Public/Context.tsx index 167c608cde..82440d9edd 100644 --- a/editor.planx.uk/src/@planx/components/MapAndLabel/Public/Context.tsx +++ b/editor.planx.uk/src/@planx/components/MapAndLabel/Public/Context.tsx @@ -93,9 +93,7 @@ export const MapAndLabelProvider: React.FC = ( }, }); - const [activeIndex, setActiveIndex] = useState( - props.previouslySubmittedData ? -1 : 0, - ); + const [activeIndex, setActiveIndex] = useState(0); const [minError, setMinError] = useState(false); const [maxError, setMaxError] = useState(false); diff --git a/editor.planx.uk/src/@planx/components/shared/Schema/InputFields/MapFieldInput.tsx b/editor.planx.uk/src/@planx/components/shared/Schema/InputFields/MapFieldInput.tsx index a374faa5a7..4b9dcb8181 100644 --- a/editor.planx.uk/src/@planx/components/shared/Schema/InputFields/MapFieldInput.tsx +++ b/editor.planx.uk/src/@planx/components/shared/Schema/InputFields/MapFieldInput.tsx @@ -21,7 +21,7 @@ export const MapFieldInput: React.FC> = (props) => { const editableFeatures = props.formik.values.schemaData?.[props.activeIndex] ?.features as Feature[]; const [features, setFeatures] = useState( - editableFeatures.length > 0 ? editableFeatures : undefined, + editableFeatures?.length > 0 ? editableFeatures : undefined, ); useEffect(() => {