diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/GeometryViewer.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/GeometryViewer.jsx index 531a15a46..1300fb051 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/GeometryViewer.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/GeometryViewer.jsx @@ -68,7 +68,7 @@ function parseEwkbData(rows, column) { let value = item[key]; let buffer = Buffer.from(value, 'hex'); let geometry = WkxGeometry.parse(buffer); - if (isNaN(geometry.x) || isNaN(geometry.y)){ + if (((isNaN(geometry.x) || isNaN(geometry.y)) && !(_.isNil(geometry.x) && _.isNil(geometry.y)))){ unsupportedRows.push(item); return true; } @@ -200,7 +200,7 @@ function PopupTable({data}) { return ( {row.column} - {row.value} + {`${row.value}`} ); })} @@ -313,7 +313,7 @@ function TheMap({data}) { if (this.options.maxLength > 0) { this._map.fitBounds(this.options.homeCoordinates); } else { - this._map.setView(this.options.homeCoordinates.getCenter(), this.options.homeZoom); + this.options.homeCoordinates && this._map.setView(this.options.homeCoordinates.getCenter(), this.options.homeZoom); } }; @@ -326,7 +326,7 @@ function TheMap({data}) { options.homeCoordinates = homeCoordinates.current?.bounds; } if (options.homeZoom === null) { - options.homeZoom = map.getBoundsZoom(homeCoordinates.current?.bounds); + options.homeZoom = homeCoordinates.current?.bounds ? map.getBoundsZoom(homeCoordinates.current?.bounds) : 0; } if(options.maxLength === null) { options.maxLength = homeCoordinates.current?.maxLength;