Skip to content

Commit b923959

Browse files
committed
Don't flood the progress bars when listing resources
1 parent 7115209 commit b923959

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

resources/scripts/api/http.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ const http: AxiosInstance = axios.create({
1212
});
1313

1414
http.interceptors.request.use(req => {
15-
store.getActions().progress.startContinuous();
15+
if (!req.url?.endsWith('/resources') && (req.url?.indexOf('_debugbar') || -1) < 0) {
16+
store.getActions().progress.startContinuous();
17+
}
1618

1719
return req;
1820
});
1921

2022
http.interceptors.response.use(resp => {
21-
store.getActions().progress.setComplete();
23+
if (!resp.request?.url?.endsWith('/resources') && (resp.request?.url?.indexOf('_debugbar') || -1) < 0) {
24+
store.getActions().progress.setComplete();
25+
}
2226

2327
return resp;
2428
});

0 commit comments

Comments
 (0)