From c76e34fe810728d52a7a5294a8962cd1e702b02b Mon Sep 17 00:00:00 2001 From: yuri Date: Fri, 11 Oct 2019 15:49:53 +0300 Subject: [PATCH] fix enum --- client/src/views/fields/enum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/views/fields/enum.js b/client/src/views/fields/enum.js index d66588be1c..81484e34b7 100644 --- a/client/src/views/fields/enum.js +++ b/client/src/views/fields/enum.js @@ -110,7 +110,7 @@ define('views/fields/enum', ['views/fields/base', 'lib!Selectize'], function (De } if (this.params.isSorted && this.translatedOptions) { - this.params.options = Espo.Utils.clone(this.params.options); + this.params.options = Espo.Utils.clone(this.params.options) || []; this.params.options = this.params.options.sort(function (v1, v2) { return (this.translatedOptions[v1] || v1).localeCompare(this.translatedOptions[v2] || v2); }.bind(this));