Skip to content

Commit

Permalink
Style changes per PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ceautery committed Oct 4, 2015
1 parent 808e99f commit 16e5ce8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/jsonview.js
Expand Up @@ -118,11 +118,13 @@ var JSONView = Class({
}

// If we don't have an even number of quotes, bail and parse viewString as-is.
if (quoteMap.length % 2) {
if (quoteMap.length % 2 !== 0) {
return viewString;
}

while(quoteMap.length) orderedPairs.push(quoteMap.splice(0, 2));
while(quoteMap.length) {
orderedPairs.push(quoteMap.splice(0, 2));
}

return viewString.replace(numberFinder,
(match, ndx) => betweenOrderedPairs(ndx) ? match : '"\u200B' + match + '"'
Expand Down

0 comments on commit 16e5ce8

Please sign in to comment.