Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #151 from srawlins/catcherror
Browse files Browse the repository at this point in the history
Return valid type from Future.catchError.
  • Loading branch information
srawlins committed Dec 22, 2020
2 parents 53e002a + 17abe7a commit 6c64d9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/usage_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ class AnalyticsImpl implements Analytics {
Stream<Map<String, dynamic>> get onSend => _sendController.stream;

@override
Future waitForLastPing({Duration? timeout}) {
Future f = Future.wait(_futures).catchError((e) => null);
Future<List<dynamic>> waitForLastPing({Duration? timeout}) {
var f = Future.wait(_futures).catchError((e) => []);

if (timeout != null) {
f = f.timeout(timeout, onTimeout: () => []);
Expand Down

0 comments on commit 6c64d9e

Please sign in to comment.