From 4d7fc8be522e4eff0b41f1e1472fbfac4810b9aa Mon Sep 17 00:00:00 2001 From: Pravesh Sharma Date: Fri, 18 Oct 2024 13:05:59 +0530 Subject: [PATCH] Resolved issues reported during testing of #7655. --- .../static/js/components/sections/GeometryViewer.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;