fix error when Allow User Login is set to false (ElementReference has not been configured correctly)

This commit is contained in:
sbwalker 2023-09-19 08:49:03 -04:00
parent 840b656d1c
commit 7919e14d90

View File

@ -167,7 +167,7 @@
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender && PageState.User == null)
if (firstRender && PageState.User == null && _allowsitelogin)
{
await username.FocusAsync();
}