resolve svelte-check warnings (#819)

Co-authored-by: Jonas Plum <cugu@users.noreply.github.com>
This commit is contained in:
slothful-vassal
2026-02-18 22:08:21 +01:00
committed by GitHub
parent 5595f9b4d3
commit c8af897cdd
24 changed files with 121 additions and 92 deletions

View File

@@ -210,8 +210,10 @@
: title,
);
let robotsParams = $state("");
if (additionalRobotsProps) {
let robotsParams = $derived.by(() => {
if (!additionalRobotsProps) {
return "";
}
const {
nosnippet,
maxSnippet,
@@ -223,12 +225,12 @@
unavailableAfter,
} = additionalRobotsProps;
robotsParams = `${nosnippet ? ",nosnippet" : ""}${maxSnippet ? `,max-snippet:${maxSnippet}` : ""}${
return `${nosnippet ? ",nosnippet" : ""}${maxSnippet ? `,max-snippet:${maxSnippet}` : ""}${
maxImagePreview ? `,max-image-preview:${maxImagePreview}` : ""
}${noarchive ? ",noarchive" : ""}${unavailableAfter ? `,unavailable_after:${unavailableAfter}` : ""}${
noimageindex ? ",noimageindex" : ""
}${maxVideoPreview ? `,max-video-preview:${maxVideoPreview}` : ""}${notranslate ? ",notranslate" : ""}`;
}
});
$effect(() => {
if (!robots && additionalRobotsProps) {