diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f56b50..a630d48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### v1.3.11 10/13/2018 + + - change: refine i18n strings + - fix: change of openTabListWhenNewTab take effect immediately + - feat: add an option to allow disable open list tab when store all tabs + - pref: clear login status only if token expired + ### v1.3.10 10/3/2018 - feat: allow store tabs into a specific list by clicking the items in context menu or a button in the simple list diff --git a/src/common/service/boss.js b/src/common/service/boss.js index c83324a..c3fa5b1 100644 --- a/src/common/service/boss.js +++ b/src/common/service/boss.js @@ -71,15 +71,19 @@ const fetchData = async (uri = '', method = 'GET', data = {}) => { .then(async res => { if (res.status === 200) { const json = await res.json() + if (json.status === 'error') throw new Error(json.message) return json } else return res.text() }) .catch(async err => { // remove expired token - await browser.storage.local.remove(tokenKey) - await browser.storage.local.remove('sync_info') - console.error(err) - throw new Error('Internal Server Error') + if (err.status === 401) { + await browser.storage.local.remove(tokenKey) + await browser.storage.local.remove('sync_info') + } else { + console.error(err) + throw new Error('Internal Server Error') + } }) } diff --git a/src/manifest.json b/src/manifest.json index 37d154f..14af9d3 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "__MSG_ext_name__", - "version": "1.4.0", + "version": "1.3.11", "default_locale": "en", "description": "__MSG_ext_desc__", "author": "WangJie ",