diff --git a/inc/script.js b/inc/script.js index e16b8071..71f58e68 100644 --- a/inc/script.js +++ b/inc/script.js @@ -557,11 +557,18 @@ function viewLogs() { } $( function() { $('a').click(function(e) { - var cur_path = window.location.pathname; - $('title').text($(this).attr('title')); - history.pushState({}, '', $(this).attr('href')); - if ($(this).attr('href').split('#')[0] && $(this).attr('href').split('#')[0] != cur_path) { - window.history.go() + try { + var cur_path = window.location.pathname; + var attr = $(this).attr('href'); + if (typeof attr !== typeof undefined && attr !== false) { + $('title').text($(this).attr('title')); + history.pushState({}, '', $(this).attr('href')); + if ($(this).attr('href').split('#')[0] && $(this).attr('href').split('#')[0] != cur_path) { + window.history.go() + } + } + } catch (err) { + console.log(err); } }); toastr.options.closeButton = true; diff --git a/inc/users.js b/inc/users.js index bb9247da..a6238f69 100644 --- a/inc/users.js +++ b/inc/users.js @@ -759,7 +759,6 @@ $( function() { function common_ajax_action_after_success(dialog_id, new_group, ajax_append_id, data) { toastr.clear(); $("#"+ajax_append_id).append(data); - console.log(new_group); $( "."+new_group ).addClass( "update", 1000); $.getScript(awesome); clearTips();