summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-plugin-lunr/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gitbook-plugin-lunr/src/index.js')
-rw-r--r--packages/gitbook-plugin-lunr/src/index.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/gitbook-plugin-lunr/src/index.js b/packages/gitbook-plugin-lunr/src/index.js
index 16caf96..0eb6e04 100644
--- a/packages/gitbook-plugin-lunr/src/index.js
+++ b/packages/gitbook-plugin-lunr/src/index.js
@@ -13,9 +13,8 @@ function searchHandler(query) {
}
module.exports = GitBook.createPlugin({
- init: (dispatch, getState, actions) => {
- const { search } = actions;
- dispatch(search.registerHandler('lunr', searchHandler));
+ init: (dispatch, getState, { Search }) => {
+ dispatch(Search.registerHandler('lunr', searchHandler));
},
reduce: (state, action) => state
});