client/tag_categories: load tag_categories after (attempted) login

Fixes #262
This commit is contained in:
neobooru 2019-07-22 23:57:40 +02:00 committed by Shyam Sunder
parent b8699d59d2
commit 8f0835f27b

View file

@ -28,7 +28,6 @@ router.enter(
const tags = require('./tags.js');
const api = require('./api.js');
tags.refreshCategoryColorMap(); // we don't care about errors
api.fetchConfig().then(() => {
// register controller routes
@ -61,6 +60,7 @@ api.fetchConfig().then(() => {
window.alert('Could not fetch basic configuration from server');
}).then(() => {
api.loginFromCookies().then(() => {
tags.refreshCategoryColorMap();
router.start();
}, error => {
if (window.location.href.indexOf('login') !== -1) {