Fixed unsaved-changes controller for firefox
This commit is contained in:
parent
bd36984edf
commit
9b521c1f2b
1 changed files with 2 additions and 1 deletions
|
|
@ -13,7 +13,8 @@ export default class extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
formState() {
|
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) {
|
leavingPage(event) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue