From 25f78e90e6c20e1a0e3222c13ba1daff41791d28 Mon Sep 17 00:00:00 2001 From: ajford Date: Fri, 27 Jun 2025 00:29:23 -0500 Subject: [PATCH] Fixes #477 by defaulting to spool values first --- client/src/pages/spools/edit.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/pages/spools/edit.tsx b/client/src/pages/spools/edit.tsx index b214b3e65..c67506ccb 100644 --- a/client/src/pages/spools/edit.tsx +++ b/client/src/pages/spools/edit.tsx @@ -131,8 +131,8 @@ export const SpoolEdit: React.FC = () => { const [usedWeight, setUsedWeight] = useState(0); useEffect(() => { - const newFilamentWeight = selectedFilament?.weight || 0; - const newSpoolWeight = selectedFilament?.spool_weight || 0; + const newFilamentWeight = getFilamentWeight(); + const newSpoolWeight = getSpoolWeight(); if (newFilamentWeight > 0) { form.setFieldValue("initial_weight", newFilamentWeight); }