From 2f3b89bbb0b7ca41e2b3247a3c25eab36c2b5c6f Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 10 Oct 2021 21:08:49 +0100 Subject: [PATCH] :zap: Include the index in item ID --- src/components/LinkItems/Section.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/LinkItems/Section.vue b/src/components/LinkItems/Section.vue index 9fbdb825..59e8523d 100644 --- a/src/components/LinkItems/Section.vue +++ b/src/components/LinkItems/Section.vue @@ -17,9 +17,9 @@ :style="gridStyle" > a.charCodeAt(0)).reduce((x, y) => x + y); - return `${charSum}_${itemStr.replace(/\s+/g, '-').replace(/[^a-zA-Z ]/g, '').toLowerCase()}`; + const itemTitleStr = itemStr.replace(/\s+/g, '-').replace(/[^a-zA-Z ]/g, '').toLowerCase(); + return `${index}_${charSum}_${itemTitleStr}`; }, /* Opens the iframe modal */ triggerModal(url) {