Skip to content

Commit 661b05a

Browse files
committed
fix: init bug
1 parent 4902de9 commit 661b05a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ let themeCSS = { dark: [], light: [] };
2727
let styleElSheet;
2828
let parse;
2929

30-
let linkTag = document.querySelector('link[parse], link[collection][document_id][name]');
31-
// let linkTag = document.querySelector('link[collection][document_id][name]:not([save="false"])');
32-
3330
function init(linkTag) {
3431
if (linkTag) {
3532
parse = linkTag.getAttribute('parse');
@@ -319,7 +316,9 @@ observer.init({
319316
}
320317
});
321318

322-
init();
319+
let linkTag = document.querySelector('link[parse], link[collection][document_id][name]');
320+
if (linkTag)
321+
init(linkTag);
323322

324323
export default {initElements};
325324

0 commit comments

Comments
 (0)