app/assets/javascripts/thin_man.js in thin_man-0.12.2 vs app/assets/javascripts/thin_man.js in thin_man-0.12.3

- old
+ new

@@ -45,10 +45,16 @@ $.ajax(this.ajax_options); }, getTarget: function(){ var target_selector = this.jq_obj.data('ajax-target'); if(target_selector){ - this.target = $(target_selector); + if($(target_selector).length > 0){ + this.target = $(target_selector); + }else{ + console.log('Warning! Thin Man selector ' + target_selector + ' not found') + } + }else{ + console.log('Warning! Thin Man selector not given') } }, getErrorTarget: function(){ if($(this.jq_obj.data('error-target')).length > 0){ this.error_target = $(this.jq_obj.data('error-target'));