Ensure _allEnvelopes is never null after assignment
Modified the assignment of `_allEnvelopes` to use the result of `EnvelopeService.GetAsync()` or an empty list (`[]`) if the result is null. This change prevents potential null reference issues when `_allEnvelopes` is used later in the code.
This commit is contained in:
@@ -352,7 +352,7 @@
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_allEnvelopes = await EnvelopeService.GetAsync();
|
_allEnvelopes = await EnvelopeService.GetAsync() ?? [];
|
||||||
|
|
||||||
// Split into active and completed based on status
|
// Split into active and completed based on status
|
||||||
var envelopes = _allEnvelopes.ToList();
|
var envelopes = _allEnvelopes.ToList();
|
||||||
|
|||||||
Reference in New Issue
Block a user