Skip to content

Commit 92d2cb8

Browse files
Merge pull request #7179 from hotosm/hot-fix/crash-contribution-page-on-sandbox-project
2 parents 9237327 + 4f11576 commit 92d2cb8

File tree

1 file changed

+2
-2
lines changed
  • frontend/src/components/taskSelection

1 file changed

+2
-2
lines changed

frontend/src/components/taskSelection/footer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const TaskSelectionFooter = ({
2828
const { pathname } = useLocation();
2929
const token = useSelector((state) => state.auth.token);
3030
const locale = useSelector((state) => state.preferences.locale);
31-
const [editor, setEditor] = useState(defaultUserEditor);
31+
const [editor, setEditor] = useState(project?.sandbox ? 'ID' : defaultUserEditor);
3232
const [editorOptions, setEditorOptions] = useState([]);
3333
const [isPending, setIsPending] = useState(false);
3434
const [lockError, setLockError] = useState(null);
@@ -181,7 +181,7 @@ const TaskSelectionFooter = ({
181181
project?.database,
182182
]);
183183

184-
const updateEditor = (arr) => setEditor(arr[0].value);
184+
const updateEditor = (arr) => setEditor(arr?.[0].value);
185185
const titleClasses = 'db ttu f7 blue-grey mb2 fw5';
186186

187187
return (

0 commit comments

Comments
 (0)