File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ export default function connectAdvanced(
121
121
this . renderCount = 0
122
122
this . store = props [ storeKey ] || context [ storeKey ]
123
123
this . propsMode = Boolean ( props [ storeKey ] )
124
+ this . setWrappedInstance = this . setWrappedInstance . bind ( this )
124
125
125
126
invariant ( this . store ,
126
127
`Could not find "${ storeKey } " in either the context or props of ` +
@@ -239,7 +240,7 @@ export default function connectAdvanced(
239
240
// instance. a singleton memoized selector would then be holding a reference to the
240
241
// instance, preventing the instance from being garbage collected, and that would be bad
241
242
const withExtras = { ...props }
242
- if ( withRef ) withExtras . ref = this . setWrappedInstance . bind ( this )
243
+ if ( withRef ) withExtras . ref = this . setWrappedInstance
243
244
if ( renderCountProp ) withExtras [ renderCountProp ] = this . renderCount ++
244
245
if ( this . propsMode && this . subscription ) withExtras [ subscriptionKey ] = this . subscription
245
246
return withExtras
You can’t perform that action at this time.
0 commit comments