mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-17 13:37:41 +01:00
renderUniqueKey will generate duplicate keys if the SVG attributse are identical.
Fixed by adding an index attribute to the hash.
This commit is contained in:
@@ -18,10 +18,11 @@ export default (iconsObject, options) => {
|
||||
const svgString = iconsObject[icon];
|
||||
const dom = parseDOM(svgString);
|
||||
|
||||
const children = dom.map(element => {
|
||||
const children = dom.map((element, index) => {
|
||||
if (options.renderUniqueKey) {
|
||||
const hashSource = {
|
||||
name: element.name,
|
||||
index,
|
||||
...element.attribs,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user