Skip to content

Commit

Permalink
fix wv findall bug
Browse files Browse the repository at this point in the history
  • Loading branch information
eluce2 committed Feb 5, 2024
1 parent 8f4ac40 commit 0b630a9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @proofgeist/fmdapi

## 3.3.6

### Patch Changes

- fix wv find

## 3.3.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@proofgeist/fmdapi",
"version": "3.3.5",
"version": "3.3.6",
"description": "FileMaker Data API client",
"main": "dist/index.js",
"repository": "[email protected]:proofgeist/fm-dapi.git",
Expand Down
4 changes: 2 additions & 2 deletions src/wv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ function DataApi<
): Promise<FMRecord<T, U>[]> {
let runningData: GetResponse<T, U>["data"] = [];
const limit = args.limit ?? 100;
const offset = args.offset ?? 1;
let offset = args.offset ?? 1;
// eslint-disable-next-line no-constant-condition
while (true) {
const data = await find<T, U>({ ...args, ignoreEmptyResult: true });
Expand All @@ -361,7 +361,7 @@ function DataApi<
runningData.length >= data.dataInfo.foundCount
)
break;
args.offset = offset + limit;
offset = offset + limit;
}
return runningData;
}
Expand Down

0 comments on commit 0b630a9

Please sign in to comment.