Skip to content

Commit

Permalink
Further protection for just-in-case use after destroy()
Browse files Browse the repository at this point in the history
  • Loading branch information
thebarge committed May 28, 2015
1 parent f1db931 commit b1a76c1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Bellhop",
"version": "1.1.6",
"version": "1.1.7",
"main": "dist/bellhop.min.js",
"dependencies": {
"bind-polyfill": "*"
Expand Down
4 changes: 2 additions & 2 deletions dist/bellhop.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Bellhop 1.1.6 */
/*! Bellhop 1.1.7 */
(function(window, undefined){

/**
Expand Down Expand Up @@ -352,7 +352,7 @@
*/
p.off = function(type, callback)
{
if (type === undefined)
if (type === undefined || !this._listeners)
{
//remove all listeners
this._listeners = {};
Expand Down
4 changes: 2 additions & 2 deletions dist/bellhop.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Bellhop",
"version": "1.1.6",
"version": "1.1.7",
"description": "Javascript event-based communication layer between DOM and iframe.",
"url": "https://github.com/CloudKidStudio/Bellhop",
"output": "bellhop",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "1.1.6",
"version": "1.1.7",
"dependencies": {
"grunt": "~0.4.5",
"library-grunt": "*"
Expand Down
2 changes: 1 addition & 1 deletion src/Bellhop.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
*/
p.off = function(type, callback)
{
if (type === undefined)
if (type === undefined || !this._listeners)
{
//remove all listeners
this._listeners = {};
Expand Down

0 comments on commit b1a76c1

Please sign in to comment.