mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-28 23:41:48 +02:00
Fix createNode adding id when is empty
This commit is contained in:
@@ -18,7 +18,9 @@ export default class DOM {
|
|||||||
*/
|
*/
|
||||||
static createNode(tag, id = '', text = '') {
|
static createNode(tag, id = '', text = '') {
|
||||||
const node = document.createElement(tag);
|
const node = document.createElement(tag);
|
||||||
node.id = id;
|
if (id) {
|
||||||
|
node.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
node.textContent = text;
|
node.textContent = text;
|
||||||
|
Reference in New Issue
Block a user