#769 - Removed empty code block and addressed some excessive guard code

This commit is contained in:
Henry 2016-04-20 19:18:27 -07:00
parent 6322964dec
commit aac5a6d250
2 changed files with 4 additions and 7 deletions

View File

@ -140,8 +140,7 @@ define(
* @private * @private
*/ */
TableConfiguration.prototype.defaultColumnConfiguration = function () { TableConfiguration.prototype.defaultColumnConfiguration = function () {
return ((this.domainObject.getModel().configuration || {}).table || return ((this.domainObject.getModel().configuration || {}).table || {}).columns || {};
{}).columns;
}; };
/** /**
@ -176,7 +175,7 @@ define(
TableConfiguration.prototype.buildColumnConfiguration = function () { TableConfiguration.prototype.buildColumnConfiguration = function () {
var configuration = {}, var configuration = {},
//Use existing persisted config, or default it //Use existing persisted config, or default it
defaultConfig = this.defaultColumnConfiguration() || {}; defaultConfig = this.defaultColumnConfiguration();
/** /**
* For each column header, define a configuration value * For each column header, define a configuration value
@ -185,7 +184,7 @@ define(
*/ */
this.getHeaders().forEach(function (columnTitle) { this.getHeaders().forEach(function (columnTitle) {
configuration[columnTitle] = configuration[columnTitle] =
typeof (defaultConfig || {})[columnTitle] === 'undefined' ? true : typeof defaultConfig[columnTitle] === 'undefined' ? true :
defaultConfig[columnTitle]; defaultConfig[columnTitle];
}); });

View File

@ -421,9 +421,7 @@ define(
currentColumnLength, currentColumnLength,
largestColumn, largestColumn,
largestColumnLength; largestColumnLength;
if (!row[key]){ if (row[key]){
//do nothing, no value for this column;
} else {
currentColumn = (row[key]).text; currentColumn = (row[key]).text;
currentColumnLength = currentColumnLength =
(currentColumn && currentColumn.length) ? (currentColumn && currentColumn.length) ?