aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-12-05 23:54:11 -0800
committerFuwn <[email protected]>2023-12-05 23:54:11 -0800
commit5fb4e885a45bc6cae6c1a6b4142726718cf6e570 (patch)
tree0b6d73ac7a7ad83d154356c6efcccb67739ec7d2
parentfeat(wrapped): download hint seperate (diff)
downloaddue.moe-5fb4e885a45bc6cae6c1a6b4142726718cf6e570.tar.xz
due.moe-5fb4e885a45bc6cae6c1a6b4142726718cf6e570.zip
fix: types
-rw-r--r--package.json1
-rw-r--r--src/routes/api/birthdays/anisearch/+server.ts2
2 files changed, 2 insertions, 1 deletions
diff --git a/package.json b/package.json
index ef257893..17944891 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
"@sveltejs/kit": "^1.20.4",
"@types/dom-to-image": "^2.6.5",
"@types/file-saver": "^2.0.5",
+ "@types/jsdom": "^21.1.6",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.28.0",
diff --git a/src/routes/api/birthdays/anisearch/+server.ts b/src/routes/api/birthdays/anisearch/+server.ts
index 7cafb5ea..7f071927 100644
--- a/src/routes/api/birthdays/anisearch/+server.ts
+++ b/src/routes/api/birthdays/anisearch/+server.ts
@@ -27,7 +27,7 @@ export const GET = async ({ url }: { url: URL }) => {
image: anchor.getAttribute('data-bg')
? `https://cdn.anisearch.com/images/${anchor.getAttribute('data-bg')}`
: null,
- name: title.textContent.trim()
+ name: title.textContent?.trim()
};
})
);