Skip to content

Commit

Permalink
[fail] reset IsThisRendererActing correctly (#16042)
Browse files Browse the repository at this point in the history
* [fail] reset IsThisRendererActing correctly

I missed this in facebook/react#16039. I'd pointed at the wrong previous state, corrupting it in further use. This PR fixes that, and adds a test to make sure it doesn't happen again.

* warn for unacted effects only in strict mode
  • Loading branch information
renawolford6 committed Jul 3, 2019
1 parent fdec8c1 commit ff91663
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ReactTestRendererAct.js
Expand Up @@ -72,7 +72,7 @@ function act(callback: () => Thenable) {
actingUpdatesScopeDepth++;
if (__DEV__) {
previousIsSomeRendererActing = IsSomeRendererActing.current;
previousIsThisRendererActing = IsSomeRendererActing.current;
previousIsThisRendererActing = IsThisRendererActing.current;
IsSomeRendererActing.current = true;
IsThisRendererActing.current = true;
}
Expand Down

0 comments on commit ff91663

Please sign in to comment.