We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5373a3 commit 89e2354Copy full SHA for 89e2354
packages/enzyme/src/ShallowWrapper.js
@@ -389,6 +389,7 @@ class ShallowWrapper {
389
originalShouldComponentUpdate = instance.shouldComponentUpdate;
390
instance.shouldComponentUpdate = (...args) => {
391
shouldRender = originalShouldComponentUpdate.apply(instance, args);
392
+ instance.shouldComponentUpdate = originalShouldComponentUpdate;
393
return shouldRender;
394
};
395
}
@@ -402,9 +403,6 @@ class ShallowWrapper {
402
403
) {
404
instance.componentDidUpdate(prevProps, prevState, prevContext);
405
- if (originalShouldComponentUpdate) {
406
- instance.shouldComponentUpdate = originalShouldComponentUpdate;
407
- }
408
this.update();
409
});
410
0 commit comments