Closed ygalashov closed 6 years ago
Using koop-provider-sample when you hit /sample/FeatureServer this what you get:
{ "error": "Cannot read property 'name' of undefined" }
No logs are written to console and no easy way to find the reason, I had to use debugger and trace up to this: https://github.com/koopjs/FeatureServer/blob/7cabe2a63573fedb83ff4226e8e015b59d78cc35/src/info.js#L35-L48
40 name: geojson.metadata.name
You should provide defaults somewhere in the very beginning of the way (for example where router starts and receives geojson) and not to try to do it locally in every function, or use adequate getter like in lodash#get or ramda#path
Published in 2.4.6
Using koop-provider-sample when you hit /sample/FeatureServer this what you get:
No logs are written to console and no easy way to find the reason, I had to use debugger and trace up to this: https://github.com/koopjs/FeatureServer/blob/7cabe2a63573fedb83ff4226e8e015b59d78cc35/src/info.js#L35-L48
You should provide defaults somewhere in the very beginning of the way (for example where router starts and receives geojson) and not to try to do it locally in every function, or use adequate getter like in lodash#get or ramda#path