From 7d9e7d6c7498452585e744665c58eea6ca365e5d Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 23 Apr 2024 14:16:41 -0600 Subject: [PATCH] Appease linter --- src/serviceworker/index.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/serviceworker/index.ts b/src/serviceworker/index.ts index 314de4432f..25942bd3a5 100644 --- a/src/serviceworker/index.ts +++ b/src/serviceworker/index.ts @@ -91,11 +91,13 @@ self.addEventListener("fetch", (event: FetchEvent) => { // Add authentication and send the request. We add authentication even if MSC3916 endpoints aren't // being used to ensure patches like this work: // https://github.com/matrix-org/synapse/commit/2390b66bf0ec3ff5ffb0c7333f3c9b239eeb92bb - const config = !accessToken ? undefined : { - headers: { - Authorization: `Bearer ${accessToken}`, - }, - }; + const config = !accessToken + ? undefined + : { + headers: { + Authorization: `Bearer ${accessToken}`, + }, + }; return fetch(url, config); })(), ); @@ -107,11 +109,13 @@ async function tryUpdateServerSupportMap(clientApiUrl: string, accessToken?: str return; // up to date } - const config = !accessToken ? undefined : { - headers: { - Authorization: `Bearer ${accessToken}`, - }, - }; + const config = !accessToken + ? undefined + : { + headers: { + Authorization: `Bearer ${accessToken}`, + }, + }; const versions = await (await fetch(`${clientApiUrl}/_matrix/client/versions`, config)).json(); serverSupportMap[clientApiUrl] = {