Merge branch 'soon' into staging

This commit is contained in:
ansuz 2021-04-02 10:07:50 +05:30
commit a13c961df3
2 changed files with 3 additions and 0 deletions

View file

@ -2554,6 +2554,7 @@ define([
newDoc = !content.hashes || Object.keys(content.hashes).length === 0;
} else if (!privateData.isNewFile) {
// This is an empty doc but not a new file: error
// XXX clear cache before reloading
UI.errorLoadingScreen(Messages.unableToDisplay, false, function () {
common.gotoURL('');
});

View file

@ -203,6 +203,7 @@ define([
};
var showCategories = function (cat) {
hideCategories();
if (!Array.isArray(cat)) { return void console.error("invalid category"); }
cat.forEach(function (c) {
APP.$rightside.find('.'+c).show();
});
@ -214,6 +215,7 @@ define([
var metadataMgr = common.getMetadataMgr();
var privateData = metadataMgr.getPrivateData();
var active = privateData.category || 'tickets';
if (!categories[active]) { active = 'tickets'; }
common.setHash(active);
Object.keys(categories).forEach(function (key) {
var $category = $('<div>', {