client/tags: fix handling malformed tag export
This commit is contained in:
parent
cef3ad8e48
commit
6b77404ecf
2 changed files with 4 additions and 3 deletions
|
@ -54,10 +54,10 @@ for (let controller of controllers) {
|
|||
|
||||
const tags = require('./tags.js');
|
||||
const api = require('./api.js');
|
||||
Promise.all([tags.refreshExport(), api.loginFromCookies()])
|
||||
.then(() => {
|
||||
tags.refreshExport(); // we don't care about errors
|
||||
api.loginFromCookies().then(() => {
|
||||
router.start();
|
||||
}).catch(errorMessage => {
|
||||
}, errorMessage => {
|
||||
if (window.location.href.indexOf('login') !== -1) {
|
||||
api.forget();
|
||||
router.start();
|
||||
|
|
|
@ -78,6 +78,7 @@ function refreshExport() {
|
|||
_tags = new Map();
|
||||
_categories = new Map();
|
||||
reject(error);
|
||||
return;
|
||||
}
|
||||
_tags = _tagsToMap(
|
||||
response.body ? response.body.tags : []);
|
||||
|
|
Loading…
Reference in a new issue