File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -348,13 +348,13 @@ class ShallowWrapper {
348348 snapshot = instance . getSnapshotBeforeUpdate ( prevProps , state ) ;
349349 }
350350 // componentDidUpdate
351- if ( typeof instance . componentDidUpdate === 'function' ) {
351+ if (
352+ lifecycles . componentDidUpdate &&
353+ typeof instance . componentDidUpdate === 'function'
354+ ) {
352355 if ( lifecycles . getSnapshotBeforeUpdate ) {
353356 instance . componentDidUpdate ( prevProps , state , snapshot ) ;
354- } else if (
355- lifecycles . componentDidUpdate &&
356- lifecycles . componentDidUpdate . prevContext
357- ) {
357+ } else if ( lifecycles . componentDidUpdate . prevContext ) {
358358 instance . componentDidUpdate ( prevProps , state , prevContext ) ;
359359 } else {
360360 instance . componentDidUpdate ( prevProps , state ) ;
You can’t perform that action at this time.
0 commit comments