Skip to content
This repository was archived by the owner on Nov 20, 2021. It is now read-only.

Commit 3a9c570

Browse files
committed
Add undefined catch (Fix #3)
1 parent cc25c21 commit 3a9c570

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

‎src/CatManga/CatManga.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const BASE = "https://catmanga.org"
1515

1616
export const CatMangaInfo: SourceInfo = {
1717
icon: "icon.png",
18-
version: "1.2.2",
18+
version: "1.2.3",
1919
name: "CatManga",
2020
author: "PythonCoderAS",
2121
authorWebsite: "https://github.com/PythonCoderAS",

‎src/CatManga/CatMangaParser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class CatMangaParser {
9595
id: String(chapter.number),
9696
langCode: LanguageCode.ENGLISH,
9797
mangaId: mangaId,
98-
name: this.decodeHTMLEntity(chapter.title),
98+
name: this.decodeHTMLEntity(chapter.title || "") || undefined,
9999
group: (chapter.groups || []).join(", ")
100100
}))}
101101
}

‎src/tests/CatManga.test.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe("CatManga Tests", function () {
1010
let chaiAsPromised = require("chai-as-promised");
1111
chai.use(chaiAsPromised);
1212

13-
let mangaId = "kanokari";
13+
let mangaId = "saint";
1414

1515
it("Retrieve Manga Details", async () => {
1616
let details = await wrapper.getMangaDetails(source, mangaId);
@@ -78,10 +78,13 @@ describe("CatManga Tests", function () {
7878
}
7979
})
8080

81+
// TODO: Wait for upload times to be shown.
82+
/*
8183
it("Testing Notifications", async () => {
82-
let updates = await wrapper.filterUpdatedManga(source, new Date("2021-1-27"), [mangaId])
84+
let updates = await wrapper.filterUpdatedManga(source, new Date("2021-4-5"), [mangaId])
8385
expect(updates, "No server response").to.exist
8486
expect(updates, "Empty server response").to.not.be.empty
8587
expect(updates[0], "No updates").to.not.be.empty;
8688
})
89+
*/
8790
});

0 commit comments

Comments
 (0)