Skip to content

Commit eafd358

Browse files
committed
fix toast
1 parent 7f1e9c0 commit eafd358

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_src/js/features/common-fetch-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function fetchActionDoRedirect(redirect: string) {
2424

2525
async function fetchActionDoRequest(actionElem: HTMLElement, url: string, opt: RequestOpts) {
2626
try {
27+
hideToastsAll();
2728
const resp = await request(url, opt);
2829
if (resp.status === 200) {
2930
let {redirect} = await resp.json();
@@ -37,7 +38,6 @@ async function fetchActionDoRequest(actionElem: HTMLElement, url: string, opt: R
3738
return;
3839
}
3940

40-
hideToastsAll();
4141
if (resp.status >= 400 && resp.status < 500) {
4242
const data = await resp.json();
4343
// the code was quite messy, sometimes the backend uses "err", sometimes it uses "error", and even "user_error"

0 commit comments

Comments
 (0)