Skip to content

Commit 6076636

Browse files
authored
fix(core): fixed routerAjaxStart is never triggered (#4328)
1 parent dfe47cf commit 6076636

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/core/modules/router/router-class.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,9 +789,13 @@ class Router extends Framework7Class {
789789
}
790790
}
791791
router.xhrAbortController = new AbortController();
792+
const options = {
793+
method: 'GET',
794+
signal: router.xhrAbortController.signal,
795+
};
796+
router.emit('routerAjaxStart', options);
792797
let fetchRes;
793-
fetch(url, { signal: router.xhrAbortController.signal, method: 'GET' })
794-
.then((res) => {
798+
fetch(url, options).then(res => {
795799
fetchRes = res;
796800
return res.text();
797801
})

0 commit comments

Comments
 (0)