Switch from Map to Set

pull/7738/head
Fabrice Weinberg 9 years ago
parent 25ae119983
commit 85d86f80ef

@ -74,7 +74,7 @@ export default function tag ( parser ) {
}
const attributes = [];
const uniqueNames = new Map();
const uniqueNames = new Set();
let attribute;
while ( attribute = readAttribute( parser, uniqueNames ) ) {
@ -143,7 +143,7 @@ function readAttribute ( parser, uniqueNames ) {
parser.error( 'Attributes need to be unique', start );
}
uniqueNames.set(name, true);
uniqueNames.add( name );
parser.allowWhitespace();

Loading…
Cancel
Save