Skip to content

Commit 3f45fab

Browse files
committed
Event 1.0.2
1 parent ae79964 commit 3f45fab

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# v1.0.2, 2018-04-27
2+
* Fix for dispatch() method
3+
14
# v1.0.1, 2018-04-26
25
* Fix for namespace
36

Event.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public static function hasListeners(string $event) : bool
9494
public static function dispatch(string $event, array $args = [], bool $return = false)
9595
{
9696
// is there some registered $listeners ?
97-
if (count(static::$listeners) > 0) {
97+
if (isset(static::$listeners[$event]) && count(static::$listeners[$event]) > 0) {
9898

9999
// Get all listeners for given event.
100100
$listeners = static::$listeners[$event];

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Event Component
2-
![version](https://img.shields.io/badge/version-1.0.1-brightgreen.svg?style=flat-square "Version")
2+
![version](https://img.shields.io/badge/version-1.0.2-brightgreen.svg?style=flat-square "Version")
33
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/flextype-components/event/blob/master/LICENSE)
44

55
Event Component provides a versatile tool to manage events in your app.

0 commit comments

Comments
 (0)