koopjs / winnow

Deprecated
Apache License 2.0
90 stars 18 forks source link

ST_Intersects error when null feature is passed #65

Closed rgwozdz closed 6 years ago

rgwozdz commented 6 years ago

Occasionally seeing this error:

Cannot read property 'type' of null
    at Object.sql.fn.ST_Intersects (/usr/src/koop/node_modules/winnow/dist/sql.js:37:17)

Looks like it is caused by the null check occurring after initial usage: https://github.com/koopjs/winnow/blob/master/src/sql.js#L28-L29

rgwozdz commented 6 years ago

Fixed in https://github.com/koopjs/winnow/commit/aca64575d48362412f34506a289d5ce88fb6bd27 and included in release 1.13.0