Skip to content
Snippets Groups Projects

Duplicate values in ajaxPageState.libraries

Open Mohit Aghera requested to merge issue/drupal-2868737:2868737-duplicate-values-in into 11.x
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -416,7 +416,7 @@ protected function sendNoJsPlaceholders($html, $no_js_placeholders, AttachedAsse
@@ -416,7 +416,7 @@ protected function sendNoJsPlaceholders($html, $no_js_placeholders, AttachedAsse
// - the HTML to load the CSS can be rendered.
// - the HTML to load the CSS can be rendered.
// - the HTML to load the JS (at the top) can be rendered.
// - the HTML to load the JS (at the top) can be rendered.
$fake_request = $this->requestStack->getMainRequest()->duplicate();
$fake_request = $this->requestStack->getMainRequest()->duplicate();
$fake_request->query->set('ajax_page_state', ['libraries' => implode(',', $cumulative_assets->getAlreadyLoadedLibraries())]);
$fake_request->query->set('ajax_page_state', ['libraries' => implode(',', \array_unique($cumulative_assets->getAlreadyLoadedLibraries()))]);
try {
try {
$html_response = $this->filterEmbeddedResponse($fake_request, $html_response);
$html_response = $this->filterEmbeddedResponse($fake_request, $html_response);
}
}
Loading