mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
parent
3b9d0ac1bb
commit
011dabd372
1 changed files with 1 additions and 0 deletions
|
|
@ -303,6 +303,7 @@ module.exports = class {
|
|||
};
|
||||
|
||||
_binarySearchOffsets(array, searchValue, lookupByOffset=false) {
|
||||
if (array.length === 0) return -1;
|
||||
const idx = lookupByOffset ? 1 : 0;
|
||||
const searchIdx = Math.floor(array.length / 2.0);
|
||||
const inspectValue = array[searchIdx][idx];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue