From 44683b8a3497892d3e5876d230b48da565694b35 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Sun, 5 Mar 2017 23:55:13 -0500 Subject: [PATCH] 67 --- README.md | 2 +- lib/hooks.dart | 5 ++++- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8e7f90a7..da92e3ca 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # angel_framework -[![pub 1.0.0-dev.66](https://img.shields.io/badge/pub-1.0.0--dev.66-red.svg)](https://pub.dartlang.org/packages/angel_framework) +[![pub 1.0.0-dev.67](https://img.shields.io/badge/pub-1.0.0--dev.67-red.svg)](https://pub.dartlang.org/packages/angel_framework) [![build status](https://travis-ci.org/angel-dart/framework.svg)](https://travis-ci.org/angel-dart/framework) Core libraries for the Angel Framework. diff --git a/lib/hooks.dart b/lib/hooks.dart index a9887dfc..c1013952 100644 --- a/lib/hooks.dart +++ b/lib/hooks.dart @@ -66,6 +66,8 @@ HookedServiceEventListener toType(Type type) { /// Removes one or more [key]s from `e.data` or `e.result`. /// Works on single objects and iterables. +/// +/// Only applies to the client-side. HookedServiceEventListener remove(key, [remover(key, obj)]) { return (HookedServiceEvent e) async { if (!e.isAfter) throw new StateError("'remove' only works on after hooks."); @@ -113,7 +115,8 @@ HookedServiceEventListener remove(key, [remover(key, obj)]) { } } - await normalize(e.isBefore ? e.data : e.result); + if (e.params?.containsKey('provider') == true) + await normalize(e.isBefore ? e.data : e.result); }; } diff --git a/pubspec.yaml b/pubspec.yaml index 463e9a37..b17f44a8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 1.0.0-dev.66 +version: 1.0.0-dev.67 description: Core libraries for the Angel framework. author: Tobe O homepage: https://github.com/angel-dart/angel_framework