diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js index 5b08623..8e0c24b 100644 --- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js @@ -1795,7 +1795,9 @@ define( } else { // If current page is not the last page then confirm from the user - if (self.collection.state.currentPage != self.collection.state.lastPage) { + if (self.collection.state.lastPage != null && + self.collection.state.currentPage != self.collection.state.lastPage + ) { alertify.confirm('{{ _('Add New Row') }}', '{{ _('The result set display will move to the last page. Do you wish to continue?') }}', function() { @@ -2296,7 +2298,9 @@ define( } else { // If current page is not the last page then confirm from the user - if (self.collection.state.currentPage != self.collection.state.lastPage) { + if (self.collection.state.lastPage != null && + self.collection.state.currentPage != self.collection.state.lastPage + ) { alertify.confirm('{{ _('Paste Row') }}', '{{ _('The result set display will move to the last page. Do you wish to continue?') }}', function() {