diff --git a/app/MindWork AI Studio/Dialogs/DocumentCheckDialog.razor b/app/MindWork AI Studio/Dialogs/DocumentCheckDialog.razor index 65d0cffd..b75f878f 100644 --- a/app/MindWork AI Studio/Dialogs/DocumentCheckDialog.razor +++ b/app/MindWork AI Studio/Dialogs/DocumentCheckDialog.razor @@ -6,7 +6,7 @@ @T("Test how we load your file. Check the content before further processing.") - @if (FilePath == string.Empty) + @if (string.IsNullOrWhiteSpace(this.FilePath)) { } diff --git a/app/MindWork AI Studio/Dialogs/DocumentCheckDialog.razor.cs b/app/MindWork AI Studio/Dialogs/DocumentCheckDialog.razor.cs index ebf4099b..ec03e7f3 100644 --- a/app/MindWork AI Studio/Dialogs/DocumentCheckDialog.razor.cs +++ b/app/MindWork AI Studio/Dialogs/DocumentCheckDialog.razor.cs @@ -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(); } } - } \ No newline at end of file