Skip to content

Commit 097d15d

Browse files
committed
fix: set eid if not defined
1 parent c7299f9 commit 097d15d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,10 @@ function cloneTemplate(template) {
380380

381381
function insertElement(template, element, index, currentIndex) {
382382
let eid = element.getAttribute('eid')
383-
if (!eid)
384-
console.log('attribute eid not found')
383+
if (!eid) {
384+
eid = uuid.generate(6)
385+
element.setAttribute('eid', eid)
386+
}
385387

386388
if (index !== null && index >= 0) {
387389
if (!template.clones)

0 commit comments

Comments
 (0)