ensure document ready before init Docsify (#233)

This commit is contained in:
yelo 2017-08-15 23:35:27 +08:00 committed by cinwell.li
commit 10045249d3
2 changed files with 3 additions and 1 deletions

View file

@ -1,3 +1,4 @@
import ready from 'document-ready'
import { initMixin } from './init'
import { routerMixin } from './router'
import { renderMixin } from './render'
@ -30,4 +31,4 @@ Docsify.version = '__VERSION__'
/**
* Run Docsify
*/
setTimeout(_ => new Docsify(), 0)
ready(_ => new Docsify())