fix: Allow empty description

This commit is contained in:
Eric Tuvesson
2024-03-26 22:04:41 +01:00
parent fcf3a740e7
commit 9433cde97f

View File

@@ -52,11 +52,11 @@ export class ExternalCloudService {
const broker = brokers.find((x) => x.id === options.id);
if (!broker) return false;
if (options.name) broker.name = options.name;
if (options.description) broker.description = options.description;
if (options.appId) broker.appId = options.appId;
if (options.masterKey) broker.masterKey = options.masterKey;
if (options.url) broker.endpoint = options.url;
if (typeof options.name !== undefined) broker.name = options.name;
if (typeof options.description !== undefined) broker.description = options.description;
if (typeof options.appId !== undefined) broker.appId = options.appId;
if (typeof options.masterKey !== undefined) broker.masterKey = options.masterKey;
if (typeof options.url !== undefined) broker.endpoint = options.url;
await JSONStorage.set('externalBrokers', { brokers });