1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Prevent exception being thrown when renaming user.

This commit is contained in:
Jxiced 2025-02-22 14:36:10 +00:00
parent 362b21d680
commit f5d4eb244a

View file

@ -199,7 +199,7 @@ const UserEdit = () => {
throw new Error('Unexpected null user id or policy');
}
user.Name = (page.querySelector('#txtUserName') as HTMLInputElement).value;
user.Name = (page.querySelector('#txtUserName') as HTMLInputElement).value.trim();
user.Policy.IsAdministrator = (page.querySelector('.chkIsAdmin') as HTMLInputElement).checked;
user.Policy.IsHidden = (page.querySelector('.chkIsHidden') as HTMLInputElement).checked;
user.Policy.IsDisabled = (page.querySelector('.chkDisabled') as HTMLInputElement).checked;