Simplifying how parts of a charset are checked for uniqueness

This commit is contained in:
Jeff Avallone 2014-12-22 11:31:20 -05:00
parent 99970dd2ab
commit 33bbd11af6

View File

@ -39,11 +39,7 @@ export default {
setup() { setup() {
this.label = (this.properties.invert.textValue === '^') ? 'None of:' : 'One of:'; this.label = (this.properties.invert.textValue === '^') ? 'None of:' : 'One of:';
this.elements = _.unique(this.properties.parts.elements, part => { this.elements = _.unique(this.properties.parts.elements, part => {
if (part.literal) { return [part.type, part.textValue].join(':');
return part.literal;
} else {
return part.textValue;
}
}); });
} }
}; };