From 33bbd11af61ee502a34e7be79a476b17d3a58fa0 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Mon, 22 Dec 2014 11:31:20 -0500 Subject: [PATCH] Simplifying how parts of a charset are checked for uniqueness --- src/js/parser/javascript/charset.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/js/parser/javascript/charset.js b/src/js/parser/javascript/charset.js index c1d3d76..323d016 100644 --- a/src/js/parser/javascript/charset.js +++ b/src/js/parser/javascript/charset.js @@ -39,11 +39,7 @@ export default { setup() { this.label = (this.properties.invert.textValue === '^') ? 'None of:' : 'One of:'; this.elements = _.unique(this.properties.parts.elements, part => { - if (part.literal) { - return part.literal; - } else { - return part.textValue; - } + return [part.type, part.textValue].join(':'); }); } };