From 58d5b0972e34ea29c6719903702b0107ae127ff9 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Wed, 22 Feb 2017 20:19:36 -0500 Subject: [PATCH] 57 --- README.md | 2 +- lib/src/http/hooked_service.dart | 8 ++++---- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f3cff6ec..f0dee8fc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # angel_framework -[![pub 1.0.0-dev.56](https://img.shields.io/badge/pub-1.0.0--dev.56-red.svg)](https://pub.dartlang.org/packages/angel_framework) +[![pub 1.0.0-dev.57](https://img.shields.io/badge/pub-1.0.0--dev.57-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/src/http/hooked_service.dart b/lib/src/http/hooked_service.dart index 5f8535e0..ae3cbc18 100644 --- a/lib/src/http/hooked_service.dart +++ b/lib/src/http/hooked_service.dart @@ -494,15 +494,15 @@ class HookedService extends Service { } var ev = new HookedServiceEvent(true, null, null, this, eventName); - return await fireEvent(dispatcher, ev); + return await fireEvent(dispatcher, ev, callback); } /// Sends an arbitrary event down the hook chain. Future fireEvent( HookedServiceEventDispatcher dispatcher, HookedServiceEvent event, [HookedServiceEventListener callback]) async { - if (callback != null && event._canceled != true) await callback(ev); - return await dispatcher._emit(ev); + if (callback != null && event?._canceled != true) await callback(event); + return await dispatcher._emit(event); } } @@ -565,7 +565,7 @@ class HookedServiceEventDispatcher { /// Fires an event, and returns it once it is either canceled, or all listeners have run. Future _emit(HookedServiceEvent event) async { - if (event._canceled != true) { + if (event?._canceled != true) { for (var listener in listeners) { await listener(event); diff --git a/pubspec.yaml b/pubspec.yaml index dd488a4a..3d28f5a4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 1.0.0-dev.56 +version: 1.0.0-dev.57 description: Core libraries for the Angel framework. author: Tobe O homepage: https://github.com/angel-dart/angel_framework