Merge pull request #503 from ONLYOFFICE/fix/bug-46535

[SSE] Fix Bug 46535
This commit is contained in:
Julia Radzhabova 2020-09-11 11:12:17 +03:00 committed by GitHub
commit 3b61ce2011
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -762,6 +762,8 @@ Common.Utils.loadConfig = function(url, callback) {
else return 'error';
}).then(function(json){
callback(json);
}).catch(function(e) {
callback('error');
});
};

View file

@ -159,7 +159,7 @@ define([
hide: function () {
var val = this.cmbFuncGroup.getValue();
(val=='Recommended') && (val = 'Last10');
if (this.cmbFuncGroup.store.at(0).get('value')=='Recommended') {
if (this.cmbFuncGroup.store.length>0 && this.cmbFuncGroup.store.at(0).get('value')=='Recommended') {
this.cmbFuncGroup.store.shift();
this.cmbFuncGroup.onResetItems();
}
@ -337,7 +337,7 @@ define([
var removed = arr.splice(idx, 1);
arr.unshift(removed[0]);
}
} else if (arr.length==0 && this.cmbFuncGroup.store.at(0).get('value')=='Recommended') {
} else if (arr.length==0 && this.cmbFuncGroup.store.length>0 && this.cmbFuncGroup.store.at(0).get('value')=='Recommended') {
this.cmbFuncGroup.store.shift();
this.cmbFuncGroup.onResetItems();
}