Skip to content

Commit 201fd83

Browse files
committed
rename event to e
1 parent c1512d3 commit 201fd83

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

web_src/js/htmx.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ htmx.config.requestClass = "is-loading";
1010
htmx.config.scrollIntoViewOnBoost = false;
1111

1212
// https://htmx.org/events/#htmx:sendError
13-
document.body.addEventListener("htmx:sendError", (event) => {
13+
document.body.addEventListener("htmx:sendError", (e) => {
1414
// TODO: add translations
15-
showErrorToast(
16-
`Network error when calling ${event.detail.requestConfig.path}`
17-
);
15+
showErrorToast(`Network error when calling ${e.detail.requestConfig.path}`);
1816
});
1917

2018
// https://htmx.org/events/#htmx:responseError
21-
document.body.addEventListener("htmx:responseError", (event) => {
19+
document.body.addEventListener("htmx:responseError", (e) => {
2220
// TODO: add translations
2321
showErrorToast(
24-
`Error ${event.detail.xhr.status} when calling ${event.detail.requestConfig.path}`
22+
`Error ${e.detail.xhr.status} when calling ${e.detail.requestConfig.path}`
2523
);
2624
});
2725

0 commit comments

Comments
 (0)