We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5281db commit acfcf0bCopy full SHA for acfcf0b
packages/enzyme/src/ReactWrapper.js
@@ -841,9 +841,8 @@ class ReactWrapper {
841
throw new TypeError('ReactWrapper::invoke() requires the name of a prop whose value is a function');
842
}
843
return (...args) => {
844
- const response = typeof this[RENDERER].act === 'function'
845
- ? this[RENDERER].act(() => handler(...args))
846
- : handler(...args);
+ const wrapAct = this[RENDERER].act || function wrapAct(fn) { return fn(); };
+ const response = wrapAct(() => handler(...args));
847
this[ROOT].update();
848
return response;
849
};
0 commit comments