Skip to content

Commit 13a5ea3

Browse files
committed
Deferred run
1 parent 622531d commit 13a5ea3

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/core/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,14 @@ import { Docsify } from './Docsify';
44
/**
55
* Run Docsify
66
*/
7-
// eslint-disable-next-line no-unused-vars
8-
documentReady(_ => new Docsify());
7+
const runDocsify = () => {
8+
// eslint-disable-next-line no-unused-vars
9+
documentReady(_ => new Docsify());
10+
};
11+
12+
if (window.DOCSIFY_DEFER) {
13+
window.runDocsify = runDocsify;
14+
} else {
15+
window.runDocsify = () => {};
16+
runDocsify();
17+
}

0 commit comments

Comments
 (0)