Skip to content
Snippets Groups Projects
Commit 1313dc35 authored by Ryan Hartman's avatar Ryan Hartman Committed by Robin Ingelbrecht
Browse files

Issue #2962191 by devkinetic: Javascript is not being removed on non ajax pages

parent b5227781
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,8 @@ function ajax_loader_page_build(&$page) { ...@@ -100,7 +100,8 @@ function ajax_loader_page_build(&$page) {
*/ */
function ajax_loader_js_alter(&$javascript) { function ajax_loader_js_alter(&$javascript) {
// Only add throbber js file if ajax.js is included. // Only add throbber js file if ajax.js is included.
if (!isset($javascript['misc/ajax.js']) && isset($javascript['sites/all/modules/custom/ajax_loader/js/ajax-loader.js'])) { $path = drupal_get_path('module', 'ajax_loader') . "/js/ajax-loader.js";
unset($javascript['sites/all/modules/custom/ajax_loader/js/ajax-loader.js']); if (!isset($javascript['misc/ajax.js']) && isset($javascript[$path])) {
unset($javascript[$path]);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment