Index: utils/pub/utils.dart |
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart |
index a48907926ff00b101c470d9bab19a0dc2c780316..1d687f3e3c67048a5faa7a04e1fad30463803aa5 100644 |
--- a/utils/pub/utils.dart |
+++ b/utils/pub/utils.dart |
@@ -318,6 +318,8 @@ bool urisEqual(Uri uri1, Uri uri2) => |
/// Return [uri] with redundant port information removed. |
Uri canonicalizeUri(Uri uri) { |
+ if (uri == null) return null; |
+ |
var sansPort = new Uri.fromComponents( |
scheme: uri.scheme, userInfo: uri.userInfo, domain: uri.domain, |
path: uri.path, query: uri.query, fragment: uri.fragment); |