diff --git a/Oqtane.Client/App.razor b/Oqtane.Client/App.razor index 01022680..cd46eda6 100644 --- a/Oqtane.Client/App.razor +++ b/Oqtane.Client/App.razor @@ -33,23 +33,27 @@ private PageState PageState { get; set; } + protected override async Task OnParametersSetAsync() + { + _installation = await InstallationService.IsInstalled(); + if (_installation.Alias != null) + { + SiteState.Alias = _installation.Alias; + StateHasChanged(); + } + else + { + _installation.Message = "Site Not Configured Correctly - No Matching Alias Exists For Host Name"; + } + _initialized = true; + } + protected override async Task OnAfterRenderAsync(bool firstRender) { - if (firstRender && !_initialized) + if (firstRender) { var interop = new Interop(JSRuntime); SiteState.AntiForgeryToken = await interop.GetElementByName(Constants.RequestVerificationToken); - _installation = await InstallationService.IsInstalled(); - if (_installation.Alias != null) - { - SiteState.Alias = _installation.Alias; - } - else - { - _installation.Message = "Site Not Configured Correctly - No Matching Alias Exists For Host Name"; - } - _initialized = true; - StateHasChanged(); } }