Skip to content

Commit

Permalink
more generic implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
PROGrand committed Jan 28, 2025
1 parent f84fab1 commit d055407
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkgs/async/lib/src/subscription_stream.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,9 @@ class _CancelOnErrorSubscriptionWrapper<T>
super.onError((Object error, StackTrace stackTrace) {
// Wait for the cancel to complete before sending the error event.
super.cancel().whenComplete(() {
if (handleError is ZoneBinaryCallback<void, Object, StackTrace>) {
if (handleError is dynamic Function(Object, StackTrace)) {
handleError(error, stackTrace);
} else if (handleError is ZoneBinaryCallback) {
handleError(error, stackTrace);
} else if (handleError is ZoneUnaryCallback<void, Object>) {
handleError(error);
} else if (handleError is ZoneUnaryCallback) {
} else if (handleError is dynamic Function(Object)) {
handleError(error);
}
});
Expand Down

0 comments on commit d055407

Please sign in to comment.