Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export default class GeoJSONVT {
/** @param {import('geojson').GeoJSON} data @param {Options} [options] */
constructor(data, options) {
/** @type {InternalOptions} */
const opts = this.options = Object.assign(Object.create(defaultOptions), options);
const opts = this.options = Object.create(defaultOptions);
for (const key of Object.keys(options || {})) {
if (key === '__proto__' || key === 'constructor' || key === 'prototype') continue;
opts[key] = /** @type {any} */ (options)[key];
}

const debug = opts.debug;

Expand Down