From f43ddba7bc5c1251051777049d260fbab728206d Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 20 Nov 2017 09:26:04 -0700 Subject: [PATCH] Avoid error if this.input is not yet set --- api/js/etemplate/et2_widget_selectbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index d82e1d828b..d1af1a278d 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -872,7 +872,7 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend( this.input.trigger("liszt:updated"); } // Sometimes value gets set before options - if(this.value || this.options.empty_label || this.value === '' && this.input.children('[value=""]').length === 1) + if(this.value || this.options.empty_label || this.value === '' && this.input && this.input.children('[value=""]').length === 1) { this.set_value(this.value, true); // true = dont try to set_options, to avoid an infinit recursion }