mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-20 22:46:33 +02:00
Fixing NRE
This commit is contained in:
parent
721441f32d
commit
020905676a
2
src/scripts/dist/choices.js
vendored
2
src/scripts/dist/choices.js
vendored
|
@ -2645,7 +2645,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
if (passedGroups && passedGroups.length) {
|
||||
// If we have a placeholder option
|
||||
var placeholderChoice = this.passedElement.querySelector('option[placeholder]');
|
||||
if (placeholderChoice.parentNode.tagName === 'SELECT') {
|
||||
if (placeholderChoice && placeholderChoice.parentNode.tagName === 'SELECT') {
|
||||
this._addChoice(placeholderChoice.value, placeholderChoice.innerHTML, placeholderChoice.selected, placeholderChoice.disabled, undefined, undefined,
|
||||
/* placeholder */true);
|
||||
}
|
||||
|
|
2
src/scripts/dist/choices.js.map
vendored
2
src/scripts/dist/choices.js.map
vendored
File diff suppressed because one or more lines are too long
2
src/scripts/dist/choices.min.js
vendored
2
src/scripts/dist/choices.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -2637,7 +2637,7 @@ class Choices {
|
|||
if (passedGroups && passedGroups.length) {
|
||||
// If we have a placeholder option
|
||||
const placeholderChoice = this.passedElement.querySelector('option[placeholder]');
|
||||
if (placeholderChoice.parentNode.tagName === 'SELECT') {
|
||||
if (placeholderChoice && placeholderChoice.parentNode.tagName === 'SELECT') {
|
||||
this._addChoice(
|
||||
placeholderChoice.value,
|
||||
placeholderChoice.innerHTML,
|
||||
|
|
Loading…
Reference in a new issue