Commit 8a84015b authored by Martin Anderson-Clutz's avatar Martin Anderson-Clutz
Browse files

Issue #3273331 by espurnes, omkar-pd, mandcl: Cannot read properties of...

Issue #3273331 by espurnes, omkar-pd, mandcl: Cannot read properties of undefined (reading 'widths')
parent 3a05f4b9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -32,9 +32,10 @@ function multiselect_help($route_name, RouteMatchInterface $route_match) {
/**
 * Implements hook_page_attachments().
 */
function multiselect_page_attachments(&$attachments) {
function multiselect_page_attachments(array &$attachments) {
  $config = \Drupal::config('multiselect.settings');
  $attachments['#attached']['drupalSettings']['multiselect'] = ['widths' => $config->get('multiselect.widths')];
  $widths = $config->get('multiselect.widths');
  $attachments['#attached']['drupalSettings']['multiselect']['widths'] = $widths;
}

/**