Brief Description
Loading of some changesets fails.
What is the current behaviour, (attach relevant screenshots) ?
TypeError: Cannot read property 'toString' of null
What is the expected behaviour ?
A better error message or maybe no error at all.
When does this occur ?
When the changeset has no closed_at property.
How do we replicate the issue ?
Example changeset: https://www.openstreetmap.org/api/0.6/changeset/109618303.json?include_discussion=true
Other Information / context:
c.to can be null
|
to: cs.closed_at || null, |
(null).toString() does not work
Possible solutions:
- Better error message
var data = getDataParam(changeset);
+ if (!data.to) {
+ new Error('Changeset has no closed_at property!')
+ }
- Not returning null.
- to: cs.closed_at || null,
+ to: cs.closed_at || …,
feature requestBrief Description
Loading of some changesets fails.
What is the current behaviour, (attach relevant screenshots) ?
TypeError: Cannot read property 'toString' of nullWhat is the expected behaviour ?
A better error message or maybe no error at all.
When does this occur ?
When the changeset has no closed_at property.
How do we replicate the issue ?
Example changeset: https://www.openstreetmap.org/api/0.6/changeset/109618303.json?include_discussion=true
Other Information / context:
c.tocan be nullchangeset-map/lib/query.js
Line 21 in df4dbcb
(null).toString()does not workchangeset-map/lib/getChangeset.js
Line 79 in df4dbcb
Possible solutions: