diff --git a/Backend/Views/DeviceManage/Index.cshtml b/Backend/Views/DeviceManage/Index.cshtml index 20b8c0a..0901119 100644 --- a/Backend/Views/DeviceManage/Index.cshtml +++ b/Backend/Views/DeviceManage/Index.cshtml @@ -2951,9 +2951,14 @@ return; } - if ($("#device_normal_point_value_modal").val() == $("#device_close_point_value_modal").val()) { - toast_warning("點位值設定重複,請修改"); - return; + var normalValue = $("#device_normal_point_value_modal").val(); + var closeValue = $("#device_close_point_value_modal").val(); + + if (normalValue != "" && closeValue != "" && normalValue != null && closeValue != null) { + if (normalValue == closeValue) { + toast_warning("點位值設定重複,請修改"); + return; + } } if ($("#device-kind-form").valid()) {