| Index: pkg/barback/lib/src/asset_node.dart
|
| diff --git a/pkg/barback/lib/src/asset_node.dart b/pkg/barback/lib/src/asset_node.dart
|
| index 2372ba909c380217af965c26f882a64564c20acd..a1af547ddddc53cedd25b3f6044bf28cdbdad51d 100644
|
| --- a/pkg/barback/lib/src/asset_node.dart
|
| +++ b/pkg/barback/lib/src/asset_node.dart
|
| @@ -10,6 +10,7 @@ import 'asset.dart';
|
| import 'asset_id.dart';
|
| import 'errors.dart';
|
| import 'transform_node.dart';
|
| +import 'utils.dart';
|
|
|
| /// Describes the current state of an asset as part of a transformation graph.
|
| ///
|
| @@ -125,7 +126,7 @@ class AssetNode {
|
| /// The return value of [callback] is piped to the returned Future.
|
| Future _waitForState(bool test(AssetState state),
|
| callback(AssetState state)) {
|
| - if (test(state)) return new Future.sync(() => callback(state));
|
| + if (test(state)) return syncFuture(() => callback(state));
|
| return onStateChange.firstWhere(test).then((_) => callback(state));
|
| }
|
|
|
|
|