forked from FrederikBaerentsen/BrickTracker
Revert the checked state of a checkbox if an error occured
This commit is contained in:
@@ -174,6 +174,11 @@ class BrickChanger {
|
||||
console.log(error.message);
|
||||
|
||||
this.status_error(error.message);
|
||||
|
||||
// Reverse the checked state
|
||||
if (this.html_type == "checkbox") {
|
||||
this.html_element.checked = !this.html_element.checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user