From f9cc7fe1b36a066d0afa560c95218f0b713f213b Mon Sep 17 00:00:00 2001 From: Mattk70 Date: Fri, 22 Mar 2024 22:37:55 +0000 Subject: [PATCH] Fixed a regression that broke manual records creation --- js/worker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/worker.js b/js/worker.js index b88bfc2e..a57b3919 100644 --- a/js/worker.js +++ b/js/worker.js @@ -2339,12 +2339,12 @@ const getResults = async ({ select = undefined } = {}) => { let confidence = STATE.detect.confidence; - const included = STATE.selection ? [] : await getIncludedIDs(); + const included = STATE.selection ? [] : await getIncludedIDs(); if (select) { const position = await getPosition({species: species, dateTime: select.dateTime, included: included}); offset = Math.floor(position/limit) * limit; // update the pagination - const [total, , species] = await getTotal({species: species, offset: offset, included: included}) + const [total, , ] = await getTotal({species: species, offset: offset, included: included}) UI.postMessage({event: 'total-records', total: total, offset: offset, species: species}) } offset = offset ?? (species ? (STATE.filteredOffset[species] ?? 0) : STATE.globalOffset);