MXS-3424: Fix MaxCtrl parameter validation

Strict equality must be used to make sure that the value 0 doesn't compare
equal to an empty string.
This commit is contained in:
Markus Mäkelä
2021-03-02 08:46:51 +02:00
parent 2c1b3ac733
commit 1c6b7160f3

View File

@ -91,7 +91,7 @@ function parseValue(value) {
function processArgs(key, value, extra) { function processArgs(key, value, extra) {
var arr = [key, value].concat(extra) var arr = [key, value].concat(extra)
if (arr.length % 2 != 0 || arr.findIndex(v => v == 'null' || v == '') != -1) { if (arr.length % 2 != 0 || arr.findIndex(v => v === 'null' || v === '') != -1) {
// Odd number of arguments or invalid value, return null for error // Odd number of arguments or invalid value, return null for error
return null return null
} }