Skip to content

Commit 87e4036

Browse files
committed
fix: ignoreElement
1 parent c10d98a commit 87e4036

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ const { parse } = require("node-html-parser");
33
class CoCreateServerSideRender {
44
constructor(crud) {
55
this.crud = crud;
6-
this.renderedIgnoreEl = { INPUT: true, TEXTAREA: true, SELECT: true, LINK: true, IFRAME: true, "COCREATE-SELECT": true }
76
}
87

98
async HTML(html, organization_id) {
9+
let ignoreElement = { INPUT: true, TEXTAREA: true, SELECT: true, LINK: true, IFRAME: true, "COCREATE-SELECT": true }
1010

1111
let dep = [];
1212
let dbCache = new Map();
@@ -18,7 +18,7 @@ class CoCreateServerSideRender {
1818
)) {
1919
let meta = el.attributes;
2020

21-
if (this.renderedIgnoreEl[el.tagName])
21+
if (ignoreElement[el.tagName])
2222
continue;
2323

2424
if (el.tagName == "DIV" && !el.classList.contains('domEditor'))
@@ -80,11 +80,11 @@ class CoCreateServerSideRender {
8080

8181
return dom;
8282
}
83-
let result = (await render(html, 'root')).toString();
83+
let result = await render(html, 'root');
8484
dep = [];
8585
dbCache.clear();
8686

87-
return result;
87+
return result.toString();
8888
}
8989
}
9090

0 commit comments

Comments
 (0)