using getEnumMap, it will return an object array instead of object.
and need to change this function as below
checkEnumValue: function (value) {
if (this._contextObj && !this._contextObj.isBoolean(this.name)) {
var kv = this._contextObj.getEnumMap(this.name);
var valueExist = kv.some((kv) => kv.key === value);
if (!valueExist) {
this._addValidation(
" The value: " + value + " is not valid for this enumeration"
);
}
}
},
You are not the first to run into this error: https://forum.mendix.com/link/questions/108918.