diff --git a/README.md b/README.md index f1590fdd..e3be831e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # angel_route -![version 1.0.0-dev+10](https://img.shields.io/badge/version-1.0.0--dev+10-red.svg) +![version 1.0.0-dev+11](https://img.shields.io/badge/version-1.0.0--dev+11-red.svg) ![build status](https://travis-ci.org/angel-dart/route.svg) A powerful, isomorphic routing library for Dart. diff --git a/lib/src/router.dart b/lib/src/router.dart index a03bf97a..1cdb2b8b 100644 --- a/lib/src/router.dart +++ b/lib/src/router.dart @@ -242,10 +242,14 @@ class Router extends Extensible { var resolved = router.resolve(path, method: method); while (resolved != null) { - routes.add(resolved); - router.root._children.remove(resolved); + try { + routes.add(resolved); + router.root._children.remove(resolved); - resolved = router.resolve(path, method: method); + resolved = router.resolve(path, method: method); + } catch (e) { + break; + } } return routes.where((route) => route != null); diff --git a/pubspec.yaml b/pubspec.yaml index 4b7735dd..0086de5b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: angel_route description: A powerful, isomorphic routing library for Dart. -version: 1.0.0-dev+10 +version: 1.0.0-dev+11 author: Tobe O homepage: https://github.com/angel-dart/angel_route dev_dependencies: