diff --git a/README.md b/README.md index b31a6d62..b79eb071 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # angel_route -![version 1.0.0-dev+15](https://img.shields.io/badge/version-1.0.0--dev+15-red.svg) +![version 1.0.0-dev+16](https://img.shields.io/badge/version-1.0.0--dev+16-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 233aa279..71ead99d 100644 --- a/lib/src/router.dart +++ b/lib/src/router.dart @@ -49,7 +49,7 @@ class Router extends Extensible { // Check if any mounted routers can match this final handlers = [handler]; - if (middleware != null) handlers.addAll(middleware); + if (middleware != null) handlers.insertAll(0, middleware); final route = new Route(path, debug: debug, method: method, handlers: handlers); diff --git a/pubspec.yaml b/pubspec.yaml index c665fd6e..965ef22d 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+15 +version: 1.0.0-dev+16 author: Tobe O homepage: https://github.com/angel-dart/angel_route dev_dependencies: