This commit is contained in:
thosakwe 2016-11-24 02:07:06 -05:00
parent 565bf0b279
commit 5897a9839b
3 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
# angel_route
![version 1.0.0-dev+12](https://img.shields.io/badge/version-1.0.0--dev+12-red.svg)
![version 1.0.0-dev+13](https://img.shields.io/badge/version-1.0.0--dev+13-red.svg)
![build status](https://travis-ci.org/angel-dart/route.svg)
A powerful, isomorphic routing library for Dart.

View file

@ -224,7 +224,7 @@ class Router extends Extensible {
final String _path = path.replaceAll(_straySlashes, '');
final segments = _path.split('/').where((str) => str.isNotEmpty);
_printDebug('Segments: $segments');
return _resolve(root, _path, method, segments.first, segments.skip(1));
return _resolve(root, _path, method, segments.isNotEmpty ? segments.first : '', segments.skip(1));
}
/// Finds every possible [Route] that matches the given path,

View file

@ -1,6 +1,6 @@
name: angel_route
description: A powerful, isomorphic routing library for Dart.
version: 1.0.0-dev+12
version: 1.0.0-dev+13
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_route
dev_dependencies: