throw "string" -> throw new Error("string"
This commit is contained in:
@@ -32,13 +32,13 @@ export default {
|
||||
);
|
||||
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
throw new Error(res.error);
|
||||
}
|
||||
if (res.data) {
|
||||
tid.inside = res.data;
|
||||
}
|
||||
} catch (e) {
|
||||
throw e;
|
||||
throw new Error(e);
|
||||
}
|
||||
})();
|
||||
}
|
||||
@@ -69,14 +69,14 @@ export default {
|
||||
let res = await window.$gz.api.get("attachment/parent/" + tid.id);
|
||||
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
throw new Error(res.error);
|
||||
}
|
||||
if (res.data.id && res.data.id != 0) {
|
||||
this.handleOpenObjectClick(vm, res.data);
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
throw e;
|
||||
throw new Error(e);
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
);
|
||||
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
throw new Error(res.error);
|
||||
}
|
||||
if (res && res.data) {
|
||||
vm.$router.push({
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
} catch (e) {
|
||||
throw e;
|
||||
throw new Error(e);
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user