Fixing NRE

This commit is contained in:
Maxim Mig 2017-09-19 14:43:20 +03:00
parent 721441f32d
commit 020905676a
4 changed files with 4 additions and 4 deletions

View file

@ -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);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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,