Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated README with example for 1.1.1.

  • Loading branch information...
commit 3eec53592e8a83b517a447f79e9d3c536b7627d7 1 parent 379425d
@efeminella authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 README.md
View
13 README.md
@@ -273,3 +273,16 @@ broker.has('permissions' ); //false
broker.has('users'); //false
broker.has('roles'); //false
```
+
+As of version 1.1.1, invoking EventBroker.trigger with null or undefined will result in an error being thrown. This can help mitigate tracking down unhandled events due to erroneously undefined event names being referenced.
+
+``` javascript
+var Events = {
+ LOGIN: 'authentication:login'
+};
+// Events.LOGIN exist is defined
+Backbone.EventBroker.trigger(Events.LOGIN); // triggers
+
+// Events.LOGOUT is undefined
+Backbone.EventBroker.trigger(Events.AUTHENTICATION); // error thrown
+```
Please sign in to comment.
Something went wrong with that request. Please try again.