Skip to content

Commit fd4c0f7

Browse files
author
David Warwick
committed
Merge branch 'copilot/fix-recaptcha-issue' of github.com:dwarwick/JwtIdentity into copilot/fix-recaptcha-issue
2 parents 91ab09c + e47bc94 commit fd4c0f7

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

JwtIdentity.Client/Pages/Survey/Survey.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@page "/survey/{SurveyId:guid}"
22
@namespace JwtIdentity.Client.Pages.Survey
33
@inherits SurveyModel
4-
@rendermode InteractiveServer
54

65
<PageTitle>Survey Shark - Survey</PageTitle>
76

JwtIdentity.Client/Pages/Survey/Survey.razor.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,8 @@ protected override async Task OnInitializedAsync()
162162

163163
protected override async Task OnAfterRenderAsync(bool firstRender)
164164
{
165-
// Only run on the first render
166-
// Note: With InteractiveServer render mode, this runs on the server,
167-
// but JSRuntime calls are sent to the browser via SignalR
168-
if (!firstRender)
165+
// Only run JavaScript on the first render in the browser (not during prerendering)
166+
if (!firstRender || !OperatingSystem.IsBrowser())
169167
{
170168
return;
171169
}

0 commit comments

Comments
 (0)