Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
fix(docz-core): initialize config state on data server start (#678)
Browse files Browse the repository at this point in the history
In a project with no docz config files, (for example,
in a gatsby app using gatsby-theme-docz with config only
in gatsby-config.js), the config state is not initialized,
which causes errors when the config state is read.
  • Loading branch information
lettertwo authored and pedronauck committed Mar 12, 2019
1 parent e4d7cb4 commit 8c740b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/docz-core/src/states/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const state = (config: Config): State => {
id: 'config',
start: async params => {
const fn = async () => update(params, initial)

await update(params, initial)
watcher.on('add', fn)
watcher.on('change', fn)
watcher.on('unlink', fn)
Expand Down

0 comments on commit 8c740b8

Please sign in to comment.