DEVELOPMENT ENVIRONMENT

~liljamo/felu

ref: b3145b78a91402b369218a9e95a90b968a0d01c1 felu/static/felu.js -rw-r--r-- 279 bytes
b3145b78Jonni Liljamo fix: templ generate after copy 21 days ago
                                                                                
1
2
3
4
5
6
7
8
9
document.body.addEventListener('htmx:beforeSwap', function(evt) {
	if (evt.detail.xhr.status === 400) {
		evt.detail.shouldSwap = true;
		evt.detail.isError = false;
	} else if (evt.detail.xhr.status === 401) {
		evt.detail.shouldSwap = true;
		evt.detail.isError = false;
	}
})