svg-inject icon indicating copy to clipboard operation
svg-inject copied to clipboard

Simplify function `makeIdsUnique()`

Open waruyama opened this issue 3 years ago • 0 comments

Since we are not using the ònlyReferencedIds parameter anymore (or always set it to false), the function makeIdsUnique() can be simplified.

Also, the variable referencedIds is declared as an array in function makeIdsUnique().in line160.

var referencedIds = onlyReferenced ? [] : NULL;

This would not work anyways, because it is populated with the elements' id as the key:

referencedIds[id] = 1;

So let's remove the parameter and make the function makeIdsUnique() a litte bit smaller.

waruyama avatar May 22 '21 06:05 waruyama