From 0a8ceb9e6349284e75545a01ffad608b020f78e2 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Mon, 11 Dec 2023 01:12:54 +0100 Subject: Actually run prettier --- src/util/connections/ConnectionConfig.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/util/connections/ConnectionConfig.ts') diff --git a/src/util/connections/ConnectionConfig.ts b/src/util/connections/ConnectionConfig.ts index 5a2239a0..0610b43e 100644 --- a/src/util/connections/ConnectionConfig.ts +++ b/src/util/connections/ConnectionConfig.ts @@ -49,11 +49,7 @@ export const ConnectionConfig = { function applyConfig(val: any) { async function apply(obj: any, key = ""): Promise { if (typeof obj === "object" && obj !== null && !(obj instanceof Date)) - return Promise.all( - Object.keys(obj).map((k) => - apply(obj[k], key ? `${key}_${k}` : k), - ), - ); + return Promise.all(Object.keys(obj).map((k) => apply(obj[k], key ? `${key}_${k}` : k))); let pair = pairs.find((x) => x.key === key); if (!pair) pair = new ConnectionConfigEntity(); @@ -83,8 +79,7 @@ function pairsToConfig(pairs: ConnectionConfigEntity[]) { let i = 0; for (const key of keys) { - if (!isNaN(Number(key)) && !prevObj[prev]?.length) - prevObj[prev] = obj = []; + if (!isNaN(Number(key)) && !prevObj[prev]?.length) prevObj[prev] = obj = []; if (i++ === keys.length - 1) obj[key] = p.value; else if (!obj[key]) obj[key] = {}; -- cgit 1.4.1