ext-js 7.2 modern no set correct multiple property. var multiple all time is undefined

Code:
applyName: function(name) {
  var multiple;

  if (name) {
    if (multiple && name.substr(-2, 2) !== "[]") {
      name += "[]";
    }
    else if ((!multiple) && name.substr(-2, 2) === "[]") {
      name = name.substr(0, name.length - 2);
    }
  }

  return name;
}
The solution is:

Code:
applyName: function(name) {
  var multiple=this.getMultiple();

  if (name) {
    if (multiple && name.substr(-2, 2) !== "[]") {
      name += "[]";
    }
    else if ((!multiple) && name.substr(-2, 2) === "[]") {
      name = name.substr(0, name.length - 2);
    }
  }

  return name;
}