mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 05:25:53 +08:00
fix: remove unused variables (#7968)
This commit is contained in:
@@ -45,7 +45,7 @@ function getCallbackUrl(location: Location) {
|
||||
const parsedUrl = new URL(url);
|
||||
return parsedUrl.pathname + parsedUrl.search;
|
||||
}
|
||||
} catch (_) {}
|
||||
} catch {}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ const generateUrl = ({
|
||||
url.searchParams.append('xywh', xywh);
|
||||
}
|
||||
return url.toString();
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@ export class FetchService extends Service {
|
||||
if (res.headers.get('Content-Type')?.includes('application/json')) {
|
||||
try {
|
||||
reason = await res.json();
|
||||
} catch (err) {
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export const loader: LoaderFunction = async ({ request }) => {
|
||||
try {
|
||||
const { message } = await res.json();
|
||||
error = message;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
error = 'failed to verify sign-in token';
|
||||
}
|
||||
return redirect(`/signIn?error=${encodeURIComponent(error)}`);
|
||||
|
||||
@@ -187,7 +187,7 @@ function warning(cond: any, message: string) {
|
||||
// enabling "pause on exceptions" in your JavaScript debugger.
|
||||
throw new Error(message);
|
||||
// eslint-disable-next-line no-empty
|
||||
} catch (e) {}
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ const generateYml = platform => {
|
||||
sha512: hash,
|
||||
size: size,
|
||||
});
|
||||
} catch (e) {}
|
||||
} catch {}
|
||||
});
|
||||
// path & sha512 are deprecated
|
||||
yml.path = yml.files[0].url;
|
||||
|
||||
@@ -49,7 +49,7 @@ const getBaseTranslations = async (baseLanguage: { tag: string }) => {
|
||||
const main = async () => {
|
||||
try {
|
||||
await fs.access(RES_DIR);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
fs.mkdir(RES_DIR).catch(console.error);
|
||||
console.log('Create directory', RES_DIR);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user