Add condition to bypass document fetching logic

Updated the `OnInitializedAsync` method in `ReportViewer.razor`
to include a check for `AppOptions.Value.ForceToUseFakeDocument`.
This ensures that the application can bypass fetching the
actual document when the configuration option is enabled.
This commit is contained in:
2026-05-31 07:46:51 +02:00
parent 72cbccab8c
commit d97172b9cf

View File

@@ -176,7 +176,7 @@
protected override async Task OnInitializedAsync() {
if (!string.IsNullOrWhiteSpace(EnvelopeKey)) {
if (!AppOptions.Value.ForceToUseFakeDocument && !string.IsNullOrWhiteSpace(EnvelopeKey)) {
(PdfBytes, _) = await DocumentService.GetDocumentAsync(EnvelopeKey);
return;
}