diff --git a/src/pages/Editor.tsx b/src/pages/Editor.tsx index 94a77db..8d2da94 100644 --- a/src/pages/Editor.tsx +++ b/src/pages/Editor.tsx @@ -283,14 +283,11 @@ function Editor({ return response.ok }} selectStep={async (step) => { - const response = await fetchAPIGet( - `tactics/${id}/steps/${step}`, - ) - if (!response.ok) return null - setStepContent( - { stepId: step, ...(await response.json()) }, - false, - ) + const response = await fetchAPIGet(`tactics/${id}/steps/${step}`) + if (!response.ok) + return null + setStepId(step) + setStepContent({ ...await response.json() }, false) }} onAddStep={async (parent) => { const response = await fetchAPI(`tactics/${id}/steps`, {