cleanup res.error overly complex
This commit is contained in:
@@ -518,7 +518,7 @@ export default {
|
||||
listView: untokenizedListView
|
||||
})
|
||||
.then(res => {
|
||||
if (res.error != undefined) {
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
} else {
|
||||
//NOTE: This is how to call an async function and await it from sync code
|
||||
@@ -774,7 +774,7 @@ function populateSelectionLists(vm) {
|
||||
return window.$gz.api
|
||||
.get("DataListView/ViewList?ListKey=" + vm.dataListKey)
|
||||
.then(res => {
|
||||
if (res.error != undefined) {
|
||||
if (res.error) {
|
||||
window.$gz.errorHandler.handleFormError(res.error, vm);
|
||||
} else {
|
||||
vm.selectLists.listViews = res.data;
|
||||
@@ -792,7 +792,7 @@ function fetchListView(vm) {
|
||||
return;
|
||||
}
|
||||
return window.$gz.api.get("DataListView/" + vm.listViewId).then(res => {
|
||||
if (res.error != undefined) {
|
||||
if (res.error) {
|
||||
window.$gz.errorHandler.handleFormError(res.error, vm);
|
||||
} else {
|
||||
vm.listView = res.data.listView;
|
||||
|
||||
Reference in New Issue
Block a user