Skip to content

Commit

Permalink
Run action on parent zone, fix for: mobxjs#873
Browse files Browse the repository at this point in the history
  • Loading branch information
Elvis Lee committed Sep 30, 2022
1 parent 362f523 commit 31f056f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mobx/lib/src/api/async/async_action.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AsyncAction {
R _run<R>(Zone self, ZoneDelegate parent, Zone zone, R Function() f) {
final actionInfo = _actions.startAction(name: '${_actions.name}(Zone.run)');
try {
final result = parent.run(zone, f);
final result = self.parent!.run(f);
return result;
} finally {
_actions.endAction(actionInfo);
Expand All @@ -54,7 +54,7 @@ class AsyncAction {
final actionInfo =
_actions.startAction(name: '${_actions.name}(Zone.runUnary)');
try {
final result = parent.runUnary(zone, f, a);
final result = self.parent!.runUnary(f, a);
return result;
} finally {
_actions.endAction(actionInfo);
Expand Down

0 comments on commit 31f056f

Please sign in to comment.