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

View File

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