Skip to content

Commit

Permalink
Merge pull request #46 from ynhhoJ/bugfixes/yarn-conflict
Browse files Browse the repository at this point in the history
Fixed builds
  • Loading branch information
ynhhoJ authored Jul 7, 2024
2 parents ccc30d5 + ac99b71 commit 2406df6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flibusta",
"version": "0.5.0",
"version": "0.5.1",
"author": "ynhhoJ",
"description": "Unofficial Flibusta API based on website search engine. If you like to read books - buy",
"license": "MIT",
Expand Down Expand Up @@ -29,7 +29,7 @@
"example-search-genres-paginated": "ts-node ./examples/searchGenresPaginated.ts",
"test": "npm run test:specific 'tests/**/*.ts'",
"test:specific": "npx nyc mocha --timeout 15000 --node-flags '--unhandled-rejections=strict' -r ts-node/register",
"build": "webpack && yarn copy-types",
"build": "webpack && npm run copy-types",
"copy-types": "copyfiles -u 1 types/**/* build/types"
},
"dependencies": {
Expand Down
7 changes: 6 additions & 1 deletion src/api/getBooksByAuthorOpds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ class GetBooksByAuthorOpds extends FlibustaAPIHelper {
return undefined;
}

const slicedEntryToLimit = entry.slice(0, limit);
let slicedEntryToLimit = entry;

if (Array.isArray(slicedEntryToLimit)) {
slicedEntryToLimit = slicedEntryToLimit.slice(0, limit);
}

const items = this.prepareResponseFromOpdsEntry(slicedEntryToLimit);
const pages = this.getCurrentOpdsPageInformation(feed, page);

Expand Down
7 changes: 6 additions & 1 deletion src/api/getBooksByNameOpds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ class GetBooksByNameOpds extends FlibustaAPIHelper {
return undefined;
}

const slicedEntryToLimit = entry.slice(0, limit);
let slicedEntryToLimit = entry;

if (Array.isArray(slicedEntryToLimit)) {
slicedEntryToLimit = slicedEntryToLimit.slice(0, limit);
}

const items = this.prepareResponseFromOpdsEntry(slicedEntryToLimit);
const pages = this.getCurrentSearchOpdsPageInformation(feed);
const totalCountItems = feed['os:totalResults'];
Expand Down

0 comments on commit 2406df6

Please sign in to comment.