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
No known key found for this signature in database
GPG Key ID: 5CE746D557ACC499

View File

@ -91,7 +91,7 @@ function parseValue(value) {
function processArgs(key, value, 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
return null
}