app/assets/javascripts/pagelet_rails.js in pagelet_rails-0.2.1 vs app/assets/javascripts/pagelet_rails.js in pagelet_rails-0.2.2

- old
+ new

@@ -165,10 +165,10 @@ var selector = 'a[data-remote]:not([disabled]),button[data-remote]:not([disabled])'; $(selector).each(function(index, elem){ var $el = $(elem); var container = $el.closest('[data-pagelet-container]'); - if (!container) { + if (!container || container.length === 0) { return; } var params = $el.data('params'); if (!params) {