We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fff7326 commit a35173eCopy full SHA for a35173e
index.js
@@ -369,11 +369,11 @@ export default class Supercluster {
369
_map(data, i, clone) {
370
if (data[i + OFFSET_NUM] > 1) {
371
const props = this.clusterProps[data[i + OFFSET_PROP]];
372
- return clone ? Object.assign({}, props) : props;
+ return clone ? structuredClone(props) : props;
373
}
374
const original = this.points[data[i + OFFSET_ID]].properties;
375
const result = this.options.map(original);
376
- return clone && result === original ? Object.assign({}, result) : result;
+ return clone && result === original ? structuredClone(result) : result;
377
378
379
0 commit comments