Revert "Replace uses of deprecated CastError with TypeError (#53221)" (#53226)

This reverts commit 6c7c2e372a.
This commit is contained in:
Leaf Petersen
2020-03-24 23:02:41 -07:00
committed by GitHub
parent 6c7c2e372a
commit 6563b0de34
2 changed files with 3 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ const bool kIconTreeShakerEnabledDefault = false;
List<Map<String, dynamic>> _getList(dynamic object, String errorMessage) {
try {
return (object as List<dynamic>).cast<Map<String, dynamic>>();
} on TypeError catch (_) {
} on CastError catch (_) {
throw IconTreeShakerException._(errorMessage);
}
}