diff --git a/plugins/facetapi/adapter.inc b/plugins/facetapi/adapter.inc index 3fa3ee0..11ebc44 100644 --- a/plugins/facetapi/adapter.inc +++ b/plugins/facetapi/adapter.inc @@ -1318,7 +1318,10 @@ class FacetapiFacet implements ArrayAccess { // Add JavaScript settings by merging with the others already set. $merge_settings['facetapi']['facets'][] = $widget_plugin->getJavaScriptSettings(); - drupal_add_js($merge_settings, 'setting'); + $build['#attached']['js'][] = array( + 'data' => $merge_settings, + 'type' => 'setting', + ); // Return render array keyed by the FacetapiWidget::$key property. return array($widget_plugin->getKey() => $build);