Switched to IsNullOrWhiteSpace

This commit is contained in:
Thorsten Sommer 2025-12-04 19:22:14 +01:00
parent 9fb2dbb691
commit 67e866b303
No known key found for this signature in database
GPG Key ID: B0B7E2FC074BF1F5
2 changed files with 2 additions and 3 deletions

View File

@ -6,7 +6,7 @@
@T("Test how we load your file. Check the content before further processing.")
</MudJustifiedText>
@if (FilePath == string.Empty)
@if (string.IsNullOrWhiteSpace(this.FilePath))
{
<ReadFileContent Text="@T("Load file")" @bind-FileContent="@this.FileContent"/>
}

View File

@ -31,12 +31,11 @@ public partial class DocumentCheckDialog : MSGComponentBase
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender && !string.IsNullOrEmpty(this.FilePath))
if (firstRender && !string.IsNullOrWhiteSpace(this.FilePath))
{
var fileContent = await UserFile.LoadFileData(this.FilePath, this.RustService, this.DialogService);
this.FileContent = fileContent;
this.StateHasChanged();
}
}
}