From 7fddea63689e4479d8ef2c783e82bd470769e3af Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Mon, 8 Feb 2016 14:18:11 -0500 Subject: [PATCH] chore(all): prepare release 1.0.0-beta.1.1.1 --- bower.json | 2 +- dist/amd/aurelia-event-aggregator.js | 8 ++++++++ dist/aurelia-event-aggregator.js | 8 ++++++++ dist/commonjs/aurelia-event-aggregator.js | 8 ++++++++ dist/es6/aurelia-event-aggregator.js | 8 ++++++++ dist/system/aurelia-event-aggregator.js | 8 ++++++++ doc/CHANGELOG.md | 8 ++++++++ package.json | 2 +- 8 files changed, 50 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 8c40c22..71d7fa0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-event-aggregator", - "version": "1.0.0-beta.1.1.0", + "version": "1.0.0-beta.1.1.1", "description": "A lightweight pub/sub messaging system for app-wide or per-object loosely coupled events.", "keywords": [ "aurelia", diff --git a/dist/amd/aurelia-event-aggregator.js b/dist/amd/aurelia-event-aggregator.js index 8076c50..641af0e 100644 --- a/dist/amd/aurelia-event-aggregator.js +++ b/dist/amd/aurelia-event-aggregator.js @@ -38,6 +38,10 @@ define(['exports', 'aurelia-logging'], function (exports, _aureliaLogging) { var subscribers = undefined; var i = undefined; + if (!event) { + throw new Error('Event was invalid.'); + } + if (typeof event === 'string') { subscribers = this.eventLookup[event]; if (subscribers) { @@ -70,6 +74,10 @@ define(['exports', 'aurelia-logging'], function (exports, _aureliaLogging) { var handler = undefined; var subscribers = undefined; + if (!event) { + throw new Error('Event channel/type was invalid.'); + } + if (typeof event === 'string') { handler = callback; subscribers = this.eventLookup[event] || (this.eventLookup[event] = []); diff --git a/dist/aurelia-event-aggregator.js b/dist/aurelia-event-aggregator.js index a529d27..63b057a 100644 --- a/dist/aurelia-event-aggregator.js +++ b/dist/aurelia-event-aggregator.js @@ -46,6 +46,10 @@ export class EventAggregator { let subscribers; let i; + if (!event) { + throw new Error('Event was invalid.'); + } + if (typeof event === 'string') { subscribers = this.eventLookup[event]; if (subscribers) { @@ -83,6 +87,10 @@ export class EventAggregator { let handler; let subscribers; + if (!event) { + throw new Error('Event channel/type was invalid.'); + } + if (typeof event === 'string') { handler = callback; subscribers = this.eventLookup[event] || (this.eventLookup[event] = []); diff --git a/dist/commonjs/aurelia-event-aggregator.js b/dist/commonjs/aurelia-event-aggregator.js index ca6da6d..c790e22 100644 --- a/dist/commonjs/aurelia-event-aggregator.js +++ b/dist/commonjs/aurelia-event-aggregator.js @@ -43,6 +43,10 @@ var EventAggregator = (function () { var subscribers = undefined; var i = undefined; + if (!event) { + throw new Error('Event was invalid.'); + } + if (typeof event === 'string') { subscribers = this.eventLookup[event]; if (subscribers) { @@ -75,6 +79,10 @@ var EventAggregator = (function () { var handler = undefined; var subscribers = undefined; + if (!event) { + throw new Error('Event channel/type was invalid.'); + } + if (typeof event === 'string') { handler = callback; subscribers = this.eventLookup[event] || (this.eventLookup[event] = []); diff --git a/dist/es6/aurelia-event-aggregator.js b/dist/es6/aurelia-event-aggregator.js index a529d27..63b057a 100644 --- a/dist/es6/aurelia-event-aggregator.js +++ b/dist/es6/aurelia-event-aggregator.js @@ -46,6 +46,10 @@ export class EventAggregator { let subscribers; let i; + if (!event) { + throw new Error('Event was invalid.'); + } + if (typeof event === 'string') { subscribers = this.eventLookup[event]; if (subscribers) { @@ -83,6 +87,10 @@ export class EventAggregator { let handler; let subscribers; + if (!event) { + throw new Error('Event channel/type was invalid.'); + } + if (typeof event === 'string') { handler = callback; subscribers = this.eventLookup[event] || (this.eventLookup[event] = []); diff --git a/dist/system/aurelia-event-aggregator.js b/dist/system/aurelia-event-aggregator.js index bd47faa..0627f14 100644 --- a/dist/system/aurelia-event-aggregator.js +++ b/dist/system/aurelia-event-aggregator.js @@ -67,6 +67,10 @@ System.register(['aurelia-logging'], function (_export) { var subscribers = undefined; var i = undefined; + if (!event) { + throw new Error('Event was invalid.'); + } + if (typeof event === 'string') { subscribers = this.eventLookup[event]; if (subscribers) { @@ -99,6 +103,10 @@ System.register(['aurelia-logging'], function (_export) { var handler = undefined; var subscribers = undefined; + if (!event) { + throw new Error('Event channel/type was invalid.'); + } + if (typeof event === 'string') { handler = callback; subscribers = this.eventLookup[event] || (this.eventLookup[event] = []); diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index fe33c88..71f5f0a 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,11 @@ +### 1.0.0-beta.1.1.1 (2016-02-08) + + +#### Bug Fixes + +* **index:** add some error checking to guard args ([e1661a00](http://github.com/aurelia/event-aggregator/commit/e1661a00ff9894891a59cd8dfd3f5d83964de158), closes [#15](http://github.com/aurelia/event-aggregator/issues/15)) + + ### 1.0.0-beta.1.1.0 (2016-01-29) diff --git a/package.json b/package.json index 53990e7..d8fe73c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-event-aggregator", - "version": "1.0.0-beta.1.1.0", + "version": "1.0.0-beta.1.1.1", "description": "A lightweight pub/sub messaging system for app-wide or per-object loosely coupled events.", "keywords": [ "aurelia",