From 72f4f1523c145381b4b5471800c1cb2cb5046e41 Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Tue, 28 Feb 2023 13:09:35 -0500 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20allow=20bulk=20editing=20to=20s?= =?UTF-8?q?et=20a=20field=20to=20null=20(#705)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../loot-design/src/components/modals/EditField.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/loot-design/src/components/modals/EditField.js b/packages/loot-design/src/components/modals/EditField.js index 6cc252305c..606ee6e7d0 100644 --- a/packages/loot-design/src/components/modals/EditField.js +++ b/packages/loot-design/src/components/modals/EditField.js @@ -28,12 +28,14 @@ function EditField({ createPayee, }) { function onSelect(value) { - // Process the value if needed - if (name === 'amount') { - value = amountToInteger(value); - } + if (value != null) { + // Process the value if needed + if (name === 'amount') { + value = amountToInteger(value); + } - onSubmit(name, value); + onSubmit(name, value); + } modalProps.onClose(); }