From aac5a6d250cfef99633596a3a9548d975f482d18 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 20 Apr 2016 19:18:27 -0700 Subject: [PATCH] #769 - Removed empty code block and addressed some excessive guard code --- platform/features/table/src/TableConfiguration.js | 7 +++---- .../features/table/src/controllers/MCTTableController.js | 4 +--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/platform/features/table/src/TableConfiguration.js b/platform/features/table/src/TableConfiguration.js index 59994ff13e..8494d88104 100644 --- a/platform/features/table/src/TableConfiguration.js +++ b/platform/features/table/src/TableConfiguration.js @@ -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]; }); diff --git a/platform/features/table/src/controllers/MCTTableController.js b/platform/features/table/src/controllers/MCTTableController.js index fd949f7056..39540ef0b8 100644 --- a/platform/features/table/src/controllers/MCTTableController.js +++ b/platform/features/table/src/controllers/MCTTableController.js @@ -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) ?