fix missing function wrapper around init js
This commit is contained in:
+10
-6
@@ -6,11 +6,15 @@ import Root from './components/root';
|
||||
|
||||
import { id } from './common/settings';
|
||||
|
||||
const node = document.getElementById(id);
|
||||
init();
|
||||
|
||||
if (!node) {
|
||||
console.error('Remark42: Can\'t find root node.');
|
||||
return;
|
||||
function init() {
|
||||
const node = document.getElementById(id);
|
||||
|
||||
if (!node) {
|
||||
console.error('Remark42: Can\'t find root node.');
|
||||
return;
|
||||
}
|
||||
|
||||
render(<Root/>, node.parentElement, node);
|
||||
}
|
||||
|
||||
render(<Root/>, node.parentElement, node);
|
||||
|
||||
Reference in New Issue
Block a user