Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Commit

Permalink
temporary fix for summary problem with no records
Browse files Browse the repository at this point in the history
  • Loading branch information
sgsinclair committed Dec 17, 2014
1 parent ae6b6da commit 0c0e5e9
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/main/webapp/app/panel/Summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,21 +334,23 @@ Ext.define('Voyant.panel.Summary', {
scope: this,
callback: function(records, operation, success) {
var data = [];
var len = records.length;
records.forEach(function(r, index, array) {
data.push({
id: r.getId(),
type: r.getTerm(),
val: Ext.util.Format.number(r.get('rawFreq'),'0,000'),
docId: r.get('docId'),
len: len
if (records) { // TODO: why wouldn't we have records here?
var len = records.length;
records.forEach(function(r, index, array) {
data.push({
id: r.getId(),
type: r.getTerm(),
val: Ext.util.Format.number(r.get('rawFreq'),'0,000'),
docId: r.get('docId'),
len: len
});
});
});
Ext.dom.Helper.append(el, this.localize('colon')+new Ext.XTemplate(this.localize('documentType')).apply({types: data})+'.');

var nextEl = el.next('li');
if (nextEl && !nextEl.hasCls('x-hidden')) {
this.showDistinctiveWordsStep(nextEl);
Ext.dom.Helper.append(el, this.localize('colon')+new Ext.XTemplate(this.localize('documentType')).apply({types: data})+'.');
var nextEl = el.next('li');
if (nextEl && !nextEl.hasCls('x-hidden')) {
this.showDistinctiveWordsStep(nextEl);
}
}
}
});
Expand Down

0 comments on commit 0c0e5e9

Please sign in to comment.