Skip to content

Commit

Permalink
Better load check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tewr committed Oct 2, 2020
1 parent ef8039f commit eef6220
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BlazorWorker/ScriptLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public async Task InitScript()
}
private async Task<bool> IsLoaded()
{
return await jsRuntime.InvokeAsync<bool>("eval", "(function() { return !!window.BlazorWorker })()");
return await jsRuntime.InvokeAsync<bool>("window.hasOwnProperty", "BlazorWorker");
}
private async Task ExecuteRawScriptAsync(string scriptContent)
{
Expand Down

0 comments on commit eef6220

Please sign in to comment.