style: apply oxfmt fixes
This commit is contained in:
@@ -24,9 +24,7 @@ describe("resolveChannelConfigWrites", () => {
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(
|
||||
resolveChannelConfigWrites({ cfg, channelId: "slack", accountId: "work" }),
|
||||
).toBe(false);
|
||||
expect(resolveChannelConfigWrites({ cfg, channelId: "slack", accountId: "work" })).toBe(false);
|
||||
});
|
||||
|
||||
it("matches account ids case-insensitively", () => {
|
||||
@@ -40,8 +38,6 @@ describe("resolveChannelConfigWrites", () => {
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(
|
||||
resolveChannelConfigWrites({ cfg, channelId: "slack", accountId: "work" }),
|
||||
).toBe(false);
|
||||
expect(resolveChannelConfigWrites({ cfg, channelId: "slack", accountId: "work" })).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,10 +7,7 @@ type ChannelConfigWithAccounts = {
|
||||
accounts?: Record<string, { configWrites?: boolean }>;
|
||||
};
|
||||
|
||||
function resolveAccountConfig(
|
||||
accounts: ChannelConfigWithAccounts["accounts"],
|
||||
accountId: string,
|
||||
) {
|
||||
function resolveAccountConfig(accounts: ChannelConfigWithAccounts["accounts"], accountId: string) {
|
||||
if (!accounts || typeof accounts !== "object") return undefined;
|
||||
if (accountId in accounts) return accounts[accountId];
|
||||
const matchKey = Object.keys(accounts).find(
|
||||
|
||||
Reference in New Issue
Block a user