From 9705c4c66f5a48da036deebe8d4792b15edb0cac Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Mon, 23 Dec 2019 18:14:41 +0000 Subject: [PATCH] Incorporate #788 --- src/scripts/choices.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scripts/choices.ts b/src/scripts/choices.ts index c91013d..238bef8 100644 --- a/src/scripts/choices.ts +++ b/src/scripts/choices.ts @@ -2371,7 +2371,10 @@ class Choices { } _generatePlaceholderValue(): string | null { - if (this._isSelectElement) { + if ( + this._isSelectElement && + (this.passedElement as WrappedSelect).placeholderOption + ) { const { placeholderOption } = this.passedElement as WrappedSelect; return placeholderOption ? placeholderOption.text : null;