Skip to content

Commit

Permalink
Getting error for field that somehow not exist. (2)
Browse files Browse the repository at this point in the history
Error: 
`Cannot read property 'dbType' of undefined`
  • Loading branch information
konstantinzolotarev committed Feb 25, 2016
1 parent 4d286e4 commit f69608a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spatial.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const SpatialUtil = {
},

isSpatialColumn (definition) {
if (!definition.dbType) return false
if (!definition || !definition.dbType) return false

let [ $, dbType, geoType, srid ] = SpatialUtil.spatialTypeRegex.exec(definition.dbType) || [ ]
return dbType === 'geometry'
Expand Down

0 comments on commit f69608a

Please sign in to comment.