do IsNullOrEmpty instead

This commit is contained in:
Gervasio Marchand 2022-12-07 20:31:14 -03:00
parent 082d261116
commit f38c7ec00d
No known key found for this signature in database
GPG Key ID: B7736CB188DD0A38

View File

@ -33,7 +33,9 @@ public class Config
var data = JSON.Deserialize<ConfigData>(File.ReadAllText(path));
var importedPath = Path.Join(Path.GetDirectoryName(path), "imported.txt");
var apiKey = data.FakeRelayApiKey ?? Environment.GetEnvironmentVariable("FAKERELAY_APIKEY");
var apiKey = string.IsNullOrEmpty(data.FakeRelayApiKey)
? Environment.GetEnvironmentVariable("FAKERELAY_APIKEY")
: data.FakeRelayApiKey;
Instance = new Config(importedPath, data.FakeRelayUrl, apiKey, data.Tags.ToImmutableArray(), data.ImmutableSites);
}