mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-30 04:23:15 +02:00
Minor tweaks
This commit is contained in:
parent
a2be7f276a
commit
ef1e7d23ef
|
@ -163,8 +163,8 @@ export default class Choices {
|
|||
if (!cuttingTheMustard) console.error('Choices: Your browser doesn\'t support Choices');
|
||||
|
||||
// Input type check
|
||||
const canInit = this.passedElement && isElement(this.passedElement) && ['select-one', 'select-multiple', 'text'].some(type => type === this.passedElement
|
||||
.type);
|
||||
const isValidType = ['select-one', 'select-multiple', 'text'].some(type => type === this.passedElement.type);
|
||||
const canInit = isElement(this.passedElement) && isValidType;
|
||||
|
||||
if (canInit) {
|
||||
// If element has already been initalised with Choices
|
||||
|
|
Loading…
Reference in a new issue