Fixed bug where an invalid permission value kicks you from the server

canary
WolverinDEV 2020-03-28 23:22:44 +01:00
parent 9a511b502c
commit e422418e5a
2 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,7 @@
# Changelog:
* **28.03.20**
- Fixed a bug within the permission editor which kicks you from the server
* **21.03.20**
- Fixed identity import throwing an "btoa" error

View File

@ -123,7 +123,7 @@ namespace pe {
this._tag_value_input.on('change', event => {
const str_value = this._tag_value_input.val() as string;
const value = parseInt(str_value);
if(!HTMLPermission.number_filter_re.test(str_value) || value == NaN) {
if(!HTMLPermission.number_filter_re.test(str_value) || isNaN(value)) {
console.warn(tr("Failed to parse given permission value string: %s"), this._tag_value_input.val());
this._reset_value();
return;