From 2cf10afb06c0a39016ea502c817d92021763ced7 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 6 Nov 2018 14:28:09 -0500 Subject: [PATCH] Wrap parseQuery --- CHANGELOG.md | 2 ++ lib/src/core/request_context.dart | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3472afdd..8986a106 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # 2.0.0-alpha.10 * All calls to `Service.parseId` are now affixed with the `` argument. * Added `uri` getter to `AngelHttp`. +* The default for `parseQuery` now wraps query parameters in `new Map.from`. +This resolves a bug in `package:angel_validate`. # 2.0.0-alpha.9 * Add `Service.map`. diff --git a/lib/src/core/request_context.dart b/lib/src/core/request_context.dart index 0ed60ae7..6f030f2a 100644 --- a/lib/src/core/request_context.dart +++ b/lib/src/core/request_context.dart @@ -134,7 +134,8 @@ abstract class RequestContext { /// If [forceParse] is not `true`, then [uri].query will be returned, and no parsing will be performed. Future> parseQuery({bool forceParse: false}) { if (_body == null && forceParse != true) - return new Future.value(uri.queryParameters); + return new Future.value( + new Map.from(uri.queryParameters)); else return parse().then((b) => b.query); }