diff --git includes/common.inc includes/common.inc index 72fcf76..230605f 100644 --- includes/common.inc +++ includes/common.inc @@ -3958,9 +3958,10 @@ function drupal_add_js($data = NULL, $options = NULL) { // order of the calls to drupal_add_js(). $options['weight'] += count($javascript) / 1000; - if (isset($data)) { - // Add jquery.js and drupal.js, as well as the basePath setting, the - // first time a JavaScript file is added. + if (isset($data) && isset($options['type']) && $options['type'] != 'setting') { + // Add jquery.js, jquery.once.js and drupal.js, as well as the basePath + // setting, the first time a JavaScript code is added. (Don't add these if + // only JavaScript settings have been added.) if (empty($javascript)) { // url() generates the prefix using hook_url_outbound_alter(). Instead of // running the hook_url_outbound_alter() again here, extract the prefix