diff --git a/frappe/__init__.py b/frappe/__init__.py index a1c3ebf34d..585942df80 100644 --- a/frappe/__init__.py +++ b/frappe/__init__.py @@ -24,7 +24,7 @@ if sys.version[0] == '2': reload(sys) sys.setdefaultencoding("utf-8") -__version__ = '11.1.8' +__version__ = '11.1.9' __title__ = "Frappe Framework" local = Local() diff --git a/frappe/public/js/frappe/form/controls/multiselect.js b/frappe/public/js/frappe/form/controls/multiselect.js index bc4f09468b..64ca4fc83d 100644 --- a/frappe/public/js/frappe/form/controls/multiselect.js +++ b/frappe/public/js/frappe/form/controls/multiselect.js @@ -35,7 +35,7 @@ frappe.ui.form.ControlMultiSelect = frappe.ui.form.ControlAutocomplete.extend({ get_value() { let data = this._super(); // find value of label from option list and return actual value string - if (this.df.options && this.df.options[0].label) { + if (this.df.options && this.df.options.length && this.df.options[0].label) { data = data.split(',').map(op => op.trim()); data = data.map(val => { let option = this.df.options.find(op => op.label === val); @@ -48,7 +48,7 @@ frappe.ui.form.ControlMultiSelect = frappe.ui.form.ControlAutocomplete.extend({ set_formatted_input(value) { if (!value) return; // find label of value from option list and set from it as input - if (this.df.options && this.df.options[0].label) { + if (this.df.options && this.df.options.length && this.df.options[0].label) { value = value.split(',').map(d => d.trim()).map(val => { let option = this.df.options.find(op => op.value === val); return option ? option.label : val;