From 0b630a9f346e9949d065b5298e843a2ae0a14cb9 Mon Sep 17 00:00:00 2001 From: Eric Luce <37158449+eluce2@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:54:26 -0600 Subject: [PATCH] fix wv findall bug --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/wv.ts | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7330b0f..3ca9d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @proofgeist/fmdapi +## 3.3.6 + +### Patch Changes + +- fix wv find + ## 3.3.5 ### Patch Changes diff --git a/package.json b/package.json index 71c9847..3a745fb 100644 --- a/package.json +++ b/package.json @@ -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": "git@github.com:proofgeist/fm-dapi.git", diff --git a/src/wv.ts b/src/wv.ts index 1ad12cb..e69089b 100644 --- a/src/wv.ts +++ b/src/wv.ts @@ -351,7 +351,7 @@ function DataApi< ): Promise[]> { let runningData: GetResponse["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({ ...args, ignoreEmptyResult: true }); @@ -361,7 +361,7 @@ function DataApi< runningData.length >= data.dataInfo.foundCount ) break; - args.offset = offset + limit; + offset = offset + limit; } return runningData; }