Skip to content

Commit 0708698

Browse files
committed
fix: handle setting a marker to null (closes #158)
1 parent 57978e5 commit 0708698

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gpx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ L.GPX = L.FeatureGroup.extend({
295295
});
296296
} else if (typeof(value) === 'string') {
297297
markers[key] = iconize(value);
298-
} else if (typeof(value) === 'object') {
298+
} else if (typeof(value) === 'object' && value !== null) {
299299
markers[key] = this._prepare_markers(value);
300300
}
301301
});

0 commit comments

Comments
 (0)