diff --git a/src/logic/some-limit.spec.ts b/src/logic/some-limit.spec.ts index d911c799..d05edf1d 100644 --- a/src/logic/some-limit.spec.ts +++ b/src/logic/some-limit.spec.ts @@ -28,10 +28,14 @@ describe("someLimit", () => { it("should stop if true value", async () => { const sources = [vi.fn(), vi.fn()] - someLimit(sources , val => { - val() - return true - }, 1) + someLimit( + sources, + (val) => { + val() + return true + }, + 1 + ) expect(sources[0].mock.calls.length).toBe(1) expect(sources[1].mock.calls.length).toBe(0) diff --git a/src/pages/truyen-tranh/[zlug]/[epName]/[epId].vue b/src/pages/truyen-tranh/[zlug]/[epName]/[epId].vue index d65b0747..85e5dba8 100644 --- a/src/pages/truyen-tranh/[zlug]/[epName]/[epId].vue +++ b/src/pages/truyen-tranh/[zlug]/[epName]/[epId].vue @@ -68,15 +68,21 @@ meta: @click=" data && currentEpisode?.value && - IDMStore.download({ - path: `/truyen-tranh/${zlug}/${epName}/${epId}`, - manga_id: data.uid, - manga_name: data.name, - manga_image: data.image, - ep_id: data.ep_id, - ep_name: currentEpisode.value.name, - pages, - }) + pages && + IDMStore.download( + { + path: `/truyen-tranh/${zlug}`, + manga_id: data.uid, + manga_name: data.name, + manga_image: data.image, + }, + { + path: `/truyen-tranh/${zlug}/${epName}/${epId}`, + ep_id: data.ep_id, + ep_name: currentEpisode.value.name, + pages: pages.slice(0), + } + ) " >