handle invalid hashes on the admin page

pull/1/head
ansuz 4 years ago
parent ec34d90f5f
commit 82dc55e36a

@ -1691,6 +1691,7 @@ define([
if (active.indexOf('-') !== -1) { if (active.indexOf('-') !== -1) {
active = active.split('-')[0]; active = active.split('-')[0];
} }
if (!categories[active]) { active = 'general'; }
common.setHash(active); common.setHash(active);
Object.keys(categories).forEach(function (key) { Object.keys(categories).forEach(function (key) {
var $category = $('<div>', {'class': 'cp-sidebarlayout-category'}).appendTo($categories); var $category = $('<div>', {'class': 'cp-sidebarlayout-category'}).appendTo($categories);

Loading…
Cancel
Save