mirror of
https://github.com/g3rv4/GetMoarFediverse.git
synced 2024-11-24 16:43:17 +01:00
do IsNullOrEmpty instead
This commit is contained in:
parent
082d261116
commit
f38c7ec00d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user