From 13909fc1bd0dfdcf51560f618d68f7b7a155324b Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 20 Feb 2019 10:58:53 +0200 Subject: [PATCH] fix preferences --- client/src/controllers/preferences.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/controllers/preferences.js b/client/src/controllers/preferences.js index 3379fb7e97..4e9b30e1d3 100644 --- a/client/src/controllers/preferences.js +++ b/client/src/controllers/preferences.js @@ -36,7 +36,12 @@ Espo.define('controllers/preferences', ['controllers/record', 'models/preference var model = new Preferences(); model.settings = this.getConfig(); model.defs = this.getMetadata().get('entityDefs.Preferences'); - callback.call(this, model); + if (callback) { + callback.call(this, model); + } + return new Promise(function (resolve) { + resolve(model); + }); }, checkAccess: function (action) { @@ -52,5 +57,3 @@ Espo.define('controllers/preferences', ['controllers/record', 'models/preference list: function () {} }); }); - -