fix missing function wrapper around init js

This commit is contained in:
igoradamenko
2018-02-15 23:33:13 +02:00
parent 3b85e2b875
commit 1e4704d01e
+10 -6
View File
@@ -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);