1
0
mirror of https://github.com/bitwarden/mobile.git synced 2025-01-12 19:40:43 +01:00

adjust setting.Value on empty string

This commit is contained in:
Kyle Spearrin 2020-02-29 00:44:36 -05:00
parent 30d6a4d9eb
commit 70c49922b0

View File

@ -159,11 +159,12 @@ namespace Bit.App.Utilities
{
case "baseEnvironmentUrl":
var environmentService = ServiceContainer.Resolve<IEnvironmentService>("environmentService");
if(environmentService.BaseUrl != setting.Value)
var settingValue = string.IsNullOrWhiteSpace(setting.Value) ? null : setting.Value;
if(environmentService.BaseUrl != settingValue)
{
await environmentService.SetUrlsAsync(new Core.Models.Data.EnvironmentUrlData
{
Base = string.IsNullOrWhiteSpace(setting.Value) ? null : setting.Value,
Base = settingValue,
Api = environmentService.ApiUrl,
Identity = environmentService.IdentityUrl,
WebVault = environmentService.WebVaultUrl,