summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-theme-default/src/index.js
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-09-29 16:03:16 +0200
committerSamy Pesse <samypesse@gmail.com>2016-09-29 16:03:16 +0200
commit7f283791544195fa70c51003db9be3f029c014ef (patch)
tree4a5ac11ed2a3f1b6e6e0a8d3e7bedd641c0f186f /packages/gitbook-plugin-theme-default/src/index.js
parent6f98ee18468e88af01a066eb6e203e4d6ef0a52c (diff)
downloadgitbook-7f283791544195fa70c51003db9be3f029c014ef.zip
gitbook-7f283791544195fa70c51003db9be3f029c014ef.tar.gz
gitbook-7f283791544195fa70c51003db9be3f029c014ef.tar.bz2
Fix dist command
Diffstat (limited to 'packages/gitbook-plugin-theme-default/src/index.js')
-rw-r--r--packages/gitbook-plugin-theme-default/src/index.js9
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
+});