mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(select): incorrect assert condition
This commit is contained in:
@ -226,7 +226,7 @@ export class Select extends BaseInput<any> implements OnDestroy {
|
|||||||
*/
|
*/
|
||||||
getValues(): any[] {
|
getValues(): any[] {
|
||||||
const values = Array.isArray(this._value) ? this._value : [this._value];
|
const values = Array.isArray(this._value) ? this._value : [this._value];
|
||||||
assert(!this._multi && values.length <= 1, 'single only can have one value');
|
assert(this._multi || values.length <= 1, 'single only can have one value');
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user