mirror of https://github.com/ElemeFE/element
Fix undefined access on checkbox group
Trying to access the checkbox group with having one results in an error. The undefined check prevents the error.pull/21650/head
parent
473ef53f93
commit
6a5a21b4e1
|
@ -137,6 +137,7 @@
|
|||
|
||||
/* used to make the isDisabled judgment under max/min props */
|
||||
isLimitDisabled() {
|
||||
if (!this._checkboxGroup) return true;
|
||||
const { max, min } = this._checkboxGroup;
|
||||
return !!(max || min) &&
|
||||
(this.model.length >= max && !this.isChecked) ||
|
||||
|
|
Loading…
Reference in New Issue