Skip to content
Snippets Groups Projects
Commit 31228071 authored by Angie Byron's avatar Angie Byron
Browse files

Revert "Issue #1941288 by larowlan: Cleanup container call in drupal_get_js()."

This reverts commit c0475473.

Breaks the graphical installer. Thanks to larsmw for the heads-up!
parent dd57be8c
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -3839,7 +3839,12 @@ function drupal_get_js($scope = 'header', $javascript = NULL, $skip_alter = FALS
uasort($items, 'drupal_sort_css_js');
// Don't add settings if there is no other JavaScript on the page, unless
// this is an AJAX request.
if (!empty($items['settings']) || Drupal::service('request')->isXmlHttpRequest()) {
// @todo Clean up container call.
$container = drupal_container();
if ($container->has('content_negotiation') && $container->isScopeActive('request')) {
$type = $container->get('content_negotiation')->getContentType($container->get('request'));
}
if (!empty($items['settings']) || (!empty($type) && $type == 'ajax')) {
global $theme_key;
// Provide the page with information about the theme that's used, so that
// a later AJAX request can be rendered using the same theme.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment