Client: PortalSettings: Security: fix

This commit is contained in:
Viktor Fomin 2023-05-12 14:26:14 +03:00
parent 85fb071044
commit 7b101f267b
2 changed files with 3 additions and 3 deletions

View File

@ -152,7 +152,7 @@ const IpSecurity = (props) => {
saveToSessionStorage("defaultIPSettings", {
enable: enable,
ips: ips,
ips: ipsObjectArr,
});
setShowReminder(false);
toastr.success(t("SuccessfullySaveSettingsMessage"));

View File

@ -100,13 +100,13 @@ const UserFields = (props) => {
let newInput1;
let newInput2;
if (input.includes("-")) {
if (input?.includes("-")) {
newInput1 = input.split("-")[0];
newInput2 = input.split("-")[1];
}
const error = newInput2
? input.split("-").length - 1 > 1 ||
? input?.split("-").length - 1 > 1 ||
!regexp.test(newInput1) ||
!regexp.test(newInput2)
: !regexp.test(input);