| Index: lib/src/asset/dart/serialize/get_input_transform.dart
|
| diff --git a/lib/src/asset/dart/serialize/get_input_transform.dart b/lib/src/asset/dart/serialize/get_input_transform.dart
|
| index 328d72d225f8df2784a622c1d9e061da81c07bdd..b0c775156c3e2d1eff791feb0ca5778c215d3156 100644
|
| --- a/lib/src/asset/dart/serialize/get_input_transform.dart
|
| +++ b/lib/src/asset/dart/serialize/get_input_transform.dart
|
| @@ -22,10 +22,13 @@ abstract class GetInputTransform {
|
| Stream<List<int>> readInput(AssetId id) =>
|
| StreamCompleter.fromFuture(getInput(id).then((input) => input.read()));
|
|
|
| - Future<bool> hasInput(AssetId id) {
|
| - return getInput(id).then((_) => true).catchError((error) {
|
| - if (error is AssetNotFoundException && error.id == id) return false;
|
| - throw error;
|
| - });
|
| + Future<bool> hasInput(AssetId id) async {
|
| + try {
|
| + await getInput(id);
|
| + return true;
|
| + } on AssetNotFoundException catch (error) {
|
| + if (error.id == id) return false;
|
| + rethrow;
|
| + }
|
| }
|
| }
|
|
|