mapbox / supercluster

A very fast geospatial point clustering library for browsers and Node.
ISC License
2.08k stars 298 forks source link

Unpexpected numItems value: 0. at new KDBush #225

Closed BubbleTrouble14 closed 1 year ago

BubbleTrouble14 commented 1 year ago

Gettings this error and not quite sure why. Is using the latest v8.0,0.

Unpexpected numItems value: 0. at new KDBush (http://localhost:3000/static/js/bundle.js:430222:49) at Supercluster._createTree (http://localhost:3000/static/js/bundle.js:496282:18) at Supercluster.load (http://localhost:3000/static/js/bundle.js:496158:47) at http://localhost:3000/static/js/bundle.js:35796:31 at invokePassiveEffectCreate (http://localhost:3000/static/js/bundle.js:383070:24) at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:366368:18) at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:366412:20) at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:366467:35) at flushPassiveEffectsImpl (http://localhost:3000/static/js/bundle.js:383140:13) at unstable_runWithPriority (http://localhost:3000/static/js/bundle.js:420031:16)

gbiryukov commented 1 year ago

This happens when we try to .load([]) empty array. It did not throw in v7.

mourner commented 1 year ago

Thanks for the report! Pushed a fix in v8.0.1.