Fix asset cluster map showing all asset types when there are no assets.

This commit is contained in:
Michael Stenta 2020-05-31 20:47:49 -04:00
parent 0b33e9bcaf
commit 94395416c7
1 changed files with 14 additions and 14 deletions

View File

@ -42,20 +42,6 @@ function _farm_ui_views_post_render(&$view, &$output, &$cache) {
return;
}
// If there are no results in the View, bail.
if (empty($view->result)) {
return;
}
// If there are any arguments, bail.
/**
* @todo
* Display a map that is filtered by the same arguments.
*/
if (!empty($view->args)) {
return;
}
// Add JS setting to set the bundle.
$settings = array(
'farm_map' => array(
@ -70,6 +56,20 @@ function _farm_ui_views_post_render(&$view, &$output, &$cache) {
),
);
drupal_add_js($settings, array('type' => 'setting'));
// If there are no results in the View, bail.
if (empty($view->result)) {
return;
}
// If there are any arguments, bail.
/**
* @todo
* Display a map that is filtered by the same arguments.
*/
if (!empty($view->args)) {
return;
}
}
/**