File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,16 @@ htmx.config.requestClass = "is-loading";
1010htmx . 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
You can’t perform that action at this time.
0 commit comments