prisma-extension-pagination
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -70,4 +70,4 @@ import { Prisma } from '@prisma/client'; | ||
const cursor = parseCursor(before); | ||
let nextResultCount; | ||
[results, nextResultCount] = await Promise.all([model.findMany({ | ||
let nextResult; | ||
[results, nextResult] = await Promise.all([model.findMany({ | ||
...query, | ||
@@ -86,7 +86,7 @@ cursor, | ||
} | ||
hasNextPage = Boolean(nextResultCount.length); | ||
hasNextPage = Boolean(nextResult.length); | ||
} else if (typeof after === "string") { | ||
const cursor = parseCursor(after); | ||
let previousResultCount; | ||
[results, previousResultCount] = await Promise.all([model.findMany({ | ||
let previousResult; | ||
[results, previousResult] = await Promise.all([model.findMany({ | ||
...query, | ||
@@ -102,3 +102,3 @@ cursor, | ||
})]); | ||
hasPreviousPage = Boolean(previousResultCount.length); | ||
hasPreviousPage = Boolean(previousResult.length); | ||
if (results.length > limit) { | ||
@@ -105,0 +105,0 @@ hasNextPage = Boolean(results.pop()); |
{ | ||
"name": "prisma-extension-pagination", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Prisma Client extension for pagination", | ||
"type": "module", | ||
"source": "src/index.ts", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
"require": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.module.js" | ||
@@ -10,0 +12,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
47204