Skip to content

Commit 45dba11

Browse files
committed
reset initprops after merge
1 parent fe8ede1 commit 45dba11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/react-most.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export function connect(main, initprops={}) {
2424
super(props, context);
2525
// the outer props has higher piority
2626
this.state = mergeAll([ReactClass.defaultProps, initprops, props])
27+
initprops = {}
2728
if(props.history) initprops.history=true
2829
this.actions = {
2930
fromEvent(e){
@@ -37,7 +38,6 @@ export function connect(main, initprops={}) {
3738
let sinks = main(context[intentStream],props);
3839
let actionsSinks = []
3940
if(initprops.history){
40-
initprops = {}
4141
initprops.history = initHistory(context[historyStream])
4242
initprops.history.travel.observe(state=>{
4343
return this.setState(state)

0 commit comments

Comments
 (0)