Skip to content

Commit

Permalink
check for _boundEvents in _unbindEvents
Browse files Browse the repository at this point in the history
fixes #38
  • Loading branch information
desandro committed Sep 25, 2013
1 parent 0d9903a commit 0adb26b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "draggabilly",
"main": "draggabilly.js",
"version": "1.0.5",
"version": "1.0.6",
"description": "make that shiz draggable",
"dependencies": {
"classie": "desandro/classie",
Expand Down
7 changes: 6 additions & 1 deletion draggabilly.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Draggabilly v1.0.5
* Draggabilly v1.0.6
* Make that shiz draggable
* http://draggabilly.desandro.com
*/
Expand Down Expand Up @@ -320,6 +320,11 @@ Draggabilly.prototype._bindEvents = function( args ) {

Draggabilly.prototype._unbindEvents = function() {
var args = this._boundEvents;
// IE8 can trigger dragEnd twice, check for _boundEvents
if ( !args || !args.events ) {
return;
}

for ( var i=0, len = args.events.length; i < len; i++ ) {
var event = args.events[i];
eventie.unbind( args.node, event, this );
Expand Down

0 comments on commit 0adb26b

Please sign in to comment.