Skip to content
Browse files

fix unbind: correctly remove array element

  • Loading branch information...
1 parent 29803f1 commit 682960361890626304fcb83632254071ef496fe2 @gido gido committed Feb 7, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 buzz.js
View
3 buzz.js
@@ -433,7 +433,8 @@ var buzz = {
var namespace = events[ i ].idx.split( '.' );
if ( events[ i ].idx == idx || ( namespace[ 1 ] && namespace[ 1 ] == idx.replace( '.', '' ) ) ) {
this.sound.removeEventListener( type, events[ i ].func, true );
- delete events[ i ];
+ // remove event
+ events.splice(i, 1);
}
}
}

0 comments on commit 6829603

Please sign in to comment.
Something went wrong with that request. Please try again.