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:
@@ -176,7 +176,7 @@
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync() {
|
protected override async Task OnInitializedAsync() {
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(EnvelopeKey)) {
|
if (!AppOptions.Value.ForceToUseFakeDocument && !string.IsNullOrWhiteSpace(EnvelopeKey)) {
|
||||||
(PdfBytes, _) = await DocumentService.GetDocumentAsync(EnvelopeKey);
|
(PdfBytes, _) = await DocumentService.GetDocumentAsync(EnvelopeKey);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user