mirror of
https://github.com/FroggMaster/CreamInstaller.git
synced 2026-06-12 11:01:23 -07:00
Additional Changes to Correct Null Exception for #12
- Additional changes to prevent Null Exception when catalog mapping property is null.
This commit is contained in:
@@ -64,7 +64,7 @@ internal static class EpicStore
|
||||
foreach (Element element in searchStore)
|
||||
{
|
||||
string title = element.Title;
|
||||
string product = element.CatalogNs is not null && element.CatalogNs.Mappings.Length > 0
|
||||
string product = element.CatalogNs?.Mappings is { Length: > 0 }
|
||||
? element.CatalogNs.Mappings.First().PageSlug
|
||||
: null;
|
||||
string icon = null;
|
||||
@@ -85,7 +85,7 @@ internal static class EpicStore
|
||||
foreach (Element element in catalogOffers)
|
||||
{
|
||||
string title = element.Title;
|
||||
string product = element.CatalogNs is not null && element.CatalogNs.Mappings.Length > 0
|
||||
string product = element.CatalogNs?.Mappings is { Length: > 0 }
|
||||
? element.CatalogNs.Mappings.First().PageSlug
|
||||
: null;
|
||||
string icon = null;
|
||||
|
||||
Reference in New Issue
Block a user