| Index: lib/src/cancelable_operation.dart
|
| diff --git a/lib/src/cancelable_operation.dart b/lib/src/cancelable_operation.dart
|
| index 1ba6b3c4759f5b8477fb8740c51ad9c0dfb8cde5..ab8940b911ea0b6b4c39b375720e9188215c4fd5 100644
|
| --- a/lib/src/cancelable_operation.dart
|
| +++ b/lib/src/cancelable_operation.dart
|
| @@ -62,9 +62,8 @@ class CancelableOperation<T> {
|
| /// If this operation is cancelled, the returned future waits for the future
|
| /// returned by [cancel], then completes to [cancellationValue].
|
| Future valueOrCancellation([T cancellationValue]) {
|
| - var completer = new Completer.sync();
|
| -
|
| - value.then(completer.complete, onError: completer.completeError);
|
| + var completer = new Completer<T>.sync();
|
| + completer.complete(value);
|
|
|
| _completer._cancelMemo.future.then((_) {
|
| completer.complete(cancellationValue);
|
|
|