| Index: lib/src/result/future.dart
|
| diff --git a/lib/src/result/future.dart b/lib/src/result/future.dart
|
| index db9dd822c112883fe93d7ab08279c1b0c7939a8d..209e8b1e6b226fe5a9d51d579f143f088082c25f 100644
|
| --- a/lib/src/result/future.dart
|
| +++ b/lib/src/result/future.dart
|
| @@ -20,11 +20,12 @@ class ResultFuture<T> extends DelegatingFuture<T> {
|
| Result<T> _result;
|
|
|
| factory ResultFuture(Future<T> future) {
|
| - var resultFuture;
|
| - resultFuture = new ResultFuture._(Result.capture(future).then((result) {
|
| + ResultFuture<T> resultFuture;
|
| + resultFuture = new ResultFuture._(() async {
|
| + var result = await Result.capture(future);
|
| resultFuture._result = result;
|
| - return result.asFuture;
|
| - }));
|
| + return await result.asFuture;
|
| + }());
|
| return resultFuture;
|
| }
|
|
|
|
|