From 1c42b39e151446681e9f0bdb4271cad596299f65 Mon Sep 17 00:00:00 2001 From: fpdk Date: Sat, 27 Feb 2021 14:56:09 +0100 Subject: [PATCH] renderUniqueKey will generate duplicate keys if the SVG attributse are identical. Fixed by adding an index attribute to the hash. --- scripts/render/renderIconNodes.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/render/renderIconNodes.js b/scripts/render/renderIconNodes.js index 4713a14ff..fed1d7ab9 100644 --- a/scripts/render/renderIconNodes.js +++ b/scripts/render/renderIconNodes.js @@ -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, };