client/tags: fix handling malformed tag export

This commit is contained in:
rr- 2016-08-13 13:32:46 +02:00
parent cef3ad8e48
commit 6b77404ecf
2 changed files with 4 additions and 3 deletions

View file

@ -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();

View file

@ -78,6 +78,7 @@ function refreshExport() {
_tags = new Map();
_categories = new Map();
reject(error);
return;
}
_tags = _tagsToMap(
response.body ? response.body.tags : []);