summaryrefslogtreecommitdiff
path: root/packages/integrations/preact/src
diff options
context:
space:
mode:
authorGravatar Josh Goldberg ✨ <git@joshuakgoldberg.com> 2024-08-08 05:54:04 -0400
committerGravatar GitHub <noreply@github.com> 2024-08-08 17:54:04 +0800
commit4c1b769bcf0da535b9c754162ece3afedc10d822 (patch)
tree090c3e1ffb698e2bcd28375aab1769df685cd90b /packages/integrations/preact/src
parent9aaf58c1339b54f2c1394e718a0f6f609f0b6342 (diff)
downloadastro-4c1b769bcf0da535b9c754162ece3afedc10d822.tar.gz
astro-4c1b769bcf0da535b9c754162ece3afedc10d822.tar.zst
astro-4c1b769bcf0da535b9c754162ece3afedc10d822.zip
chore: bump typescript-eslint to v8 (#11649)
Diffstat (limited to 'packages/integrations/preact/src')
-rw-r--r--packages/integrations/preact/src/server.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/integrations/preact/src/server.ts b/packages/integrations/preact/src/server.ts
index 88e012d02..15e88412d 100644
--- a/packages/integrations/preact/src/server.ts
+++ b/packages/integrations/preact/src/server.ts
@@ -36,8 +36,8 @@ async function check(
// There are edge cases (SolidJS) where Preact *might* render a string,
// but components would be <undefined></undefined>
// It also might render an empty sting.
- return html == '' ? false : !/<undefined>/.test(html);
- } catch (err) {
+ return html == '' ? false : !html.includes('<undefined>');
+ } catch {
return false;
}
} finally {
@@ -108,7 +108,7 @@ function useConsoleFilter() {
try {
console.error = filteredConsoleError;
- } catch (error) {
+ } catch {
// If we're unable to hook `console.error`, just accept it
}
}