From f0a67fbc533385a842ed3ff8738b4034ff325561 Mon Sep 17 00:00:00 2001 From: Luis Date: Sat, 6 May 2017 13:17:28 +0200 Subject: [PATCH] Fix createNode adding id when is empty --- src/js/utils/dom.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/utils/dom.js b/src/js/utils/dom.js index 2aa0345..27d775c 100644 --- a/src/js/utils/dom.js +++ b/src/js/utils/dom.js @@ -18,7 +18,9 @@ export default class DOM { */ static createNode(tag, id = '', text = '') { const node = document.createElement(tag); - node.id = id; + if (id) { + node.id = id; + } if (text) { node.textContent = text;