Skip to content

Commit

Permalink
Fix typo in invalid numItems error message (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
flekschas authored May 1, 2023
1 parent f14ff0b commit 0309d1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class KDBush {
* @param {ArrayBuffer} [data] (For internal use only)
*/
constructor(numItems, nodeSize = 64, ArrayType = Float64Array, data) {
if (isNaN(numItems) || numItems < 0) throw new Error(`Unpexpected numItems value: ${numItems}.`);
if (isNaN(numItems) || numItems < 0) throw new Error(`Unexpected numItems value: ${numItems}.`);

this.numItems = +numItems;
this.nodeSize = Math.min(Math.max(+nodeSize, 2), 65535);
Expand Down

0 comments on commit 0309d1e

Please sign in to comment.