Skip to content

Commit

Permalink
Adds not empty check
Browse files Browse the repository at this point in the history
  • Loading branch information
rbans96 committed Oct 15, 2024
1 parent 45a7952 commit a35412e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public async Task<IReadOnlyList<AvailableVersion>> GetAvailableSchema(Cancellati
List<AvailableVersion> availableVersions = await _schemaClient.GetAvailabilityAsync(cancellationToken).ConfigureAwait(false);

// To ensure that schema version null/0 is not printed
if (availableVersions[0].Id == 0)
if (availableVersions != null && availableVersions.Count > 0 && availableVersions[0].Id == 0)
{
availableVersions.RemoveAt(0);
}
Expand Down

0 comments on commit a35412e

Please sign in to comment.