Sanitize variable name

This commit is contained in:
Thelonius Kort
2023-03-05 22:53:52 +01:00
parent 5d9238a65a
commit 21b97bec6e

View File

@ -6,7 +6,7 @@ let TranslationFormHook = {
this.tunit_editor = this.el.querySelector("#tunit-editor-content") this.tunit_editor = this.el.querySelector("#tunit-editor-content")
}, },
keyupHandler(e) { keyupHandler(e) {
var donothing = false var push_event = true
var preaction = () => { } var preaction = () => { }
var postaction = () => { } var postaction = () => { }
var payload = {} var payload = {}
@ -29,9 +29,9 @@ let TranslationFormHook = {
var handler = "tunit_status" var handler = "tunit_status"
payload = {status: "done"} payload = {status: "done"}
} else { } else {
donothing = true push_event = false
} }
if (!donothing) { if (push_event) {
preaction.call() preaction.call()
this.pushEventTo(this.el, handler, payload, postaction) this.pushEventTo(this.el, handler, payload, postaction)
} }