diff --git a/docs/en_US/release_notes_4_30.rst b/docs/en_US/release_notes_4_30.rst index 154633e4d..9fc9961da 100644 --- a/docs/en_US/release_notes_4_30.rst +++ b/docs/en_US/release_notes_4_30.rst @@ -25,3 +25,4 @@ Bug fixes | `Issue #6046 `_ - Fixed an issue where the state of the Save File icon does not match the dirty editor indicator. | `Issue #6047 `_ - Fixed an issue where the dirty indicator stays active even if all changes were undone. | `Issue #6058 `_ - Ensure that the rename panel should be disabled when the SQL file opened in the query tool. +| `Issue #6084 `_ - Fixed TypeError exception in schema diff when selected any identical object. diff --git a/web/pgadmin/tools/schema_diff/static/js/schema_diff_ui.js b/web/pgadmin/tools/schema_diff/static/js/schema_diff_ui.js index 1f499e5cd..6738a64b4 100644 --- a/web/pgadmin/tools/schema_diff/static/js/schema_diff_ui.js +++ b/web/pgadmin/tools/schema_diff/static/js/schema_diff_ui.js @@ -456,7 +456,9 @@ export default class SchemaDiffUI { grid.onSelectedRowsChanged.subscribe(self.handleDependencies.bind(this)); - self.model.on('change:diff_ddl', self.handleDependencies.bind(self)); + self.model.on('change:diff_ddl', function(event) { + self.handleDependencies.bind(event, self); + }); $('#schema-diff-grid').on('keyup', function() { if ((event.keyCode == 38 || event.keyCode ==40) && this.grid.getActiveCell().row) { @@ -831,8 +833,12 @@ export default class SchemaDiffUI { } } }); - // Refresh the grid - self.dataView.refresh(); + + // Check whether comparison data is loaded or not + if(!_.isUndefined(self.dataView) && !_.isNull(self.dataView)) { + // Refresh the grid + self.dataView.refresh(); + } } connect_database(server_id, db_id, callback) {