Fixed unsaved-changes controller for firefox
Some checks failed
/ Run tests (push) Failing after 5m55s
/ Run system tests (push) Failing after 1m43s
/ Build, push and deploy image (push) Has been skipped

This commit is contained in:
david 2024-10-28 23:19:23 +01:00
parent bd36984edf
commit 9b521c1f2b

View file

@ -13,7 +13,8 @@ export default class extends Controller {
}
formState() {
return JSON.stringify(new FormData(this.element).values().toArray().filter(x => x != ""))
return JSON.stringify(Array.from(new FormData(this.element).entries())
.filter(x => x[1] != ""))
}
leavingPage(event) {