Fix linting errors

This commit is contained in:
2024-07-14 21:07:51 +02:00
parent c57cd03407
commit 1c9f95cebc
8 changed files with 34 additions and 29 deletions

View File

@ -3,7 +3,7 @@ import { getMatch } from '~/lib/match';
import { Other, Redirect } from '~/lib/settings';
async function main() {
let match: Match;
let match: Match | null;
let redirect = false;
if ((match = await getMatch(window.location.host)) === null) {
if ((match = await Redirect.get()) === null) {
@ -20,7 +20,12 @@ async function main() {
await Redirect.delete();
}
const url = await match.match(re);
let url: string;
try {
url = await match.match(re);
} catch (e) {
return;
}
// send the url to the ff2mpv (https://github.com/woodruffw/ff2mpv) application
if (await Other.getFf2mpv()) {