diff options
Diffstat (limited to 'packages/gitbook-plugin-theme-default')
-rw-r--r-- | packages/gitbook-plugin-theme-default/src/index.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/gitbook-plugin-theme-default/src/index.js b/packages/gitbook-plugin-theme-default/src/index.js index ce678e1..9d328f2 100644 --- a/packages/gitbook-plugin-theme-default/src/index.js +++ b/packages/gitbook-plugin-theme-default/src/index.js @@ -48,6 +48,9 @@ ThemeBody = GitBook.connect(ThemeBody, ({page, summary, sidebar}) => { return { page, summary, sidebar }; }); -module.exports = GitBook.createPlugin((dispatch, state) => { - dispatch(GitBook.registerComponent(ThemeBody, { role: 'Body' })); -}, reduceState); +module.exports = GitBook.createPlugin({ + init: (dispatch, state) => { + dispatch(GitBook.registerComponent(ThemeBody, { role: 'Body' })); + }, + reduce: reduceState +}); |