Skip to content

Commit

Permalink
Fixed a regression that broke manual records creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattk70 committed Mar 22, 2024
1 parent 58e5bfe commit f9cc7fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f9cc7fe

Please sign in to comment.