throw "string" -> throw new Error("string"

This commit is contained in:
2020-09-16 17:37:22 +00:00
parent 3dc5f8134c
commit f67379f83f
31 changed files with 195 additions and 151 deletions

View File

@@ -21,7 +21,7 @@ export default {
if (keepChecking && window.$gz.store.state.authenticated) {
status = await window.$gz.api.get("notify/new-count");
if (status.error) {
throw status.error;
throw new Error(status.error);
} else {
window.$gz.store.commit("setNewNotificationCount", status.data);
//success so go to default in case it was changed by an error