Fixed TypeError exception in schema diff when selected any identical object. Fixes #6084

This commit is contained in:
Rahul Shirsat 2020-12-21 15:06:01 +05:30 committed by Akshay Joshi
parent a0ff0e30fb
commit ed5fc20ee2
2 changed files with 10 additions and 3 deletions

View File

@ -25,3 +25,4 @@ Bug fixes
| `Issue #6046 <https://redmine.postgresql.org/issues/6046>`_ - Fixed an issue where the state of the Save File icon does not match the dirty editor indicator. | `Issue #6046 <https://redmine.postgresql.org/issues/6046>`_ - Fixed an issue where the state of the Save File icon does not match the dirty editor indicator.
| `Issue #6047 <https://redmine.postgresql.org/issues/6047>`_ - Fixed an issue where the dirty indicator stays active even if all changes were undone. | `Issue #6047 <https://redmine.postgresql.org/issues/6047>`_ - Fixed an issue where the dirty indicator stays active even if all changes were undone.
| `Issue #6058 <https://redmine.postgresql.org/issues/6058>`_ - Ensure that the rename panel should be disabled when the SQL file opened in the query tool. | `Issue #6058 <https://redmine.postgresql.org/issues/6058>`_ - Ensure that the rename panel should be disabled when the SQL file opened in the query tool.
| `Issue #6084 <https://redmine.postgresql.org/issues/6084>`_ - Fixed TypeError exception in schema diff when selected any identical object.

View File

@ -456,7 +456,9 @@ export default class SchemaDiffUI {
grid.onSelectedRowsChanged.subscribe(self.handleDependencies.bind(this)); 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() { $('#schema-diff-grid').on('keyup', function() {
if ((event.keyCode == 38 || event.keyCode ==40) && this.grid.getActiveCell().row) { 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) { connect_database(server_id, db_id, callback) {