From e3468c7128ab4ae27f2381812bd6e4ba75fd53e8 Mon Sep 17 00:00:00 2001 From: Marco 'Lubber' Wienkoop Date: Mon, 17 Feb 2020 10:21:38 +0100 Subject: [PATCH] fix(form): make a difference between value 0 and false for radio buttons A form gets radio values wrong, if one of them has a value of 0, but returns false instead --- src/definitions/behaviors/form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 8c81ccd3c1..cc76d6ec1a 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -706,7 +706,7 @@ $.fn.form = function(parameters) { } else { if(isRadio) { - if(values[name] === undefined || values[name] == false) { + if(values[name] === undefined || values[name] === false) { values[name] = (isChecked) ? value || true : false