cleanup res.error overly complex

This commit is contained in:
2020-04-09 22:45:05 +00:00
parent baadc9c3c2
commit ae3baeb954
13 changed files with 32 additions and 34 deletions

View File

@@ -301,7 +301,7 @@ function fetchTranslatedText(vm) {
//
function getServerInfo(vm) {
return window.$gz.api.get("ServerInfo").then(res => {
if (res.error != undefined) {
if (res.error) {
throw res.error;
} else {
vm.serverInfo = res.data;