Skip to content

Commit 7071761

Browse files
committed
chore: update response.error condition to exclude hook-aborted case
1 parent 30b8fbf commit 7071761

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

adminforth/spa/src/views/CreateView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ async function saveRecord() {
154154
record: record.value,
155155
},
156156
});
157-
if (response?.error == true) {
157+
if (response?.error && response?.error !== 'Operation aborted by hook') {
158158
showErrorTost(response.error);
159159
}
160160
saving.value = false;

adminforth/spa/src/views/EditView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ async function saveRecord() {
177177
record: updates,
178178
},
179179
});
180-
if (resp.error) {
180+
if (resp.error && resp.error !== 'Operation aborted by hook') {
181181
showErrorTost(resp.error);
182182
} else {
183183
adminforth.alert({

0 commit comments

Comments
 (0)