Skip to content

Commit 4284c3e

Browse files
committed
Allows an additional 'options' parameter to be passed into react-tree-walker.
1 parent 54485f1 commit 4284c3e

File tree

3 files changed

+295
-236
lines changed

3 files changed

+295
-236
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@
9191
"webpack-hot-middleware": "2.18.0"
9292
},
9393
"dependencies": {
94-
"react-tree-walker": "^2.0.1"
94+
"react-tree-walker": "^2.1.0"
9595
}
9696
}

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import reactTreeWalker from 'react-tree-walker'
22

3-
export default function asyncBootstrapper(app) {
3+
export default function asyncBootstrapper(app, options) {
44
const visitor = (element, instance) => {
55
if (instance && typeof instance.asyncBootstrap === 'function') {
66
return instance.asyncBootstrap()
77
}
88
return true
99
}
1010

11-
return reactTreeWalker(app, visitor, {})
11+
return reactTreeWalker(app, visitor, {}, options)
1212
}

0 commit comments

Comments
 (0)