From b01276808e9604d6f112ac3e8f94f796ba3d6cd0 Mon Sep 17 00:00:00 2001 From: Moriah Kreeger Date: Tue, 5 Jan 2021 21:50:21 -0800 Subject: [PATCH] fix null check for condition threshold to allow 0 values (#12295) --- .../src/views/CRUD/alert/AlertReportModal.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx index 36561079e..204a1886d 100644 --- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx +++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx @@ -1201,8 +1201,11 @@ const AlertReportModal: FunctionComponent = ({ name="threshold" disabled={conditionNotNull} value={ - currentAlert && currentAlert.validator_config_json - ? currentAlert.validator_config_json.threshold || '' + currentAlert && + currentAlert.validator_config_json && + currentAlert.validator_config_json.threshold !== + undefined + ? currentAlert.validator_config_json.threshold : '' } placeholder={t('Value')}