Fixes an issue rendering the dashboard, when data object is missing.

Also, fixed an issue checking the existence of the data object before
accessing it in schema javascript module.
This commit is contained in:
Murtuza Zabuawala 2016-06-02 14:58:06 +05:30 committed by Ashesh Vashi
parent d202366a5d
commit 60208b7ae5
2 changed files with 5 additions and 1 deletions

View File

@ -444,7 +444,7 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
//Check if we are not child of catalog
prev_i = t.hasParent(i) ? t.parent(i) : null;
prev_d = prev_i ? t.itemData(prev_i) : null;
if( prev_d._type == 'catalog') {
if( prev_d && prev_d._type == 'catalog') {
return false;
}
i = t.hasParent(i) ? t.parent(i) : null;

View File

@ -305,6 +305,10 @@ function(r, $, pgAdmin, _, Backbone) {
grid = $(container).data('grid');
filter = $(container).data('filter');
if(_.isUndefined(data)){
return null;
}
data.fetch({
reset: true,
success: function() {