Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed multiple-inclusion detection for when no event handlers bound t…

…o document.
  • Loading branch information...
commit 2f6447cb59ed38110f4cb16b14141722d540af7f 1 parent cde5d97
Steve Schwartz JangoSteve authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/rails.js
2  src/rails.js
View
@@ -49,7 +49,7 @@
// by detecting and raising an error when it happens.
var alreadyInitialized = function() {
var events = $(document).data('events');
- return events.click && $.grep(events.click, function(e) { return e.namespace === 'rails'; }).length;
+ return events && events.click && $.grep(events.click, function(e) { return e.namespace === 'rails'; }).length;
}
if ( alreadyInitialized() ) {
Please sign in to comment.
Something went wrong with that request. Please try again.