From 14f39756f0c9e02af72eba8d3bb47cd06c637c4a Mon Sep 17 00:00:00 2001 From: calexo Date: Mon, 25 Feb 2013 18:07:26 +0100 Subject: [PATCH] Google Closure Compiler doesn't like 'char' var char replaced by character --- src/js/dataset.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/dataset.js b/src/js/dataset.js index e97d0196..bbad9689 100644 --- a/src/js/dataset.js +++ b/src/js/dataset.js @@ -97,8 +97,8 @@ var Dataset = (function() { itemHash[id = utils.getUniqueId(item.value)] = item; utils.each(item.tokens, function(i, token) { - var char = token.charAt(0), - adjacency = adjacencyList[char] || (adjacencyList[char] = [id]); + var character = token.charAt(0), + adjacency = adjacencyList[character] || (adjacencyList[character] = [id]); !~utils.indexOf(adjacency, id) && adjacency.push(id); }); @@ -114,10 +114,10 @@ var Dataset = (function() { utils.mixin(this.itemHash, processedData.itemHash); // merge adjacency list - utils.each(processedData.adjacencyList, function(char, adjacency) { - var masterAdjacency = that.adjacencyList[char]; + utils.each(processedData.adjacencyList, function(character, adjacency) { + var masterAdjacency = that.adjacencyList[character]; - that.adjacencyList[char] = masterAdjacency ? + that.adjacencyList[character] = masterAdjacency ? masterAdjacency.concat(adjacency) : adjacency; }); },