From c0a4ccaf8cdab3374ae0987eb0fe6380818d5520 Mon Sep 17 00:00:00 2001 From: Robert Buels Date: Wed, 13 Jun 2012 16:21:31 +0000 Subject: [PATCH] a little more robustness when dealing with malformed data --- js/SeqFeatureStore/NCList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/SeqFeatureStore/NCList.js b/js/SeqFeatureStore/NCList.js index 766c296834..c195c4c737 100644 --- a/js/SeqFeatureStore/NCList.js +++ b/js/SeqFeatureStore/NCList.js @@ -37,7 +37,7 @@ SeqFeatureStore.NCList.prototype.load = function() { // fetch the trackdata dojo.xhrGet({ url: url, handleAs: "json", - load: dojo.hitch( this, function(o) { this.loadSuccess(o, url); }), + load: Util.debugHandler( this, function(o) { this.loadSuccess(o, url); }), error: dojo.hitch( this, function(e) { console.error(''+e); this.loadFail(e, url); } ) }); }; @@ -50,7 +50,7 @@ SeqFeatureStore.NCList.prototype.loadSuccess = function( trackInfo, url ) { this.loadNCList( trackInfo, url ); - if (trackInfo.histograms) { + if ( trackInfo.histograms && trackInfo.histograms.meta ) { this.histograms = trackInfo.histograms; for (var i = 0; i < this.histograms.meta.length; i++) { this.histograms.meta[i].lazyArray =