From e422418e5a273c58ea8c3dad867151eb725c4743 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 28 Mar 2020 23:22:44 +0100 Subject: [PATCH] Fixed bug where an invalid permission value kicks you from the server --- ChangeLog.md | 3 +++ shared/js/ui/modal/permission/HTMLPermissionEditor.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index d81621f1..3499b027 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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 diff --git a/shared/js/ui/modal/permission/HTMLPermissionEditor.ts b/shared/js/ui/modal/permission/HTMLPermissionEditor.ts index bf3692ee..f1400da9 100644 --- a/shared/js/ui/modal/permission/HTMLPermissionEditor.ts +++ b/shared/js/ui/modal/permission/HTMLPermissionEditor.ts @@ -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;