Recursive merge the build arrays to avoid overriding the views index.

Because farm_sensor_listener_farm_sensor_view returns a build array with
the 'views' index set, this causes other views already in the build
array to be overwritten.
This commit is contained in:
paul121 2020-07-22 15:38:21 -07:00 committed by Michael Stenta
parent d5e0d089d1
commit 338f103444
1 changed files with 1 additions and 1 deletions

View File

@ -186,7 +186,7 @@ function farm_sensor_entity_view_alter(&$build, $type) {
// Merge the asset view content into the build array.
if (!empty($module_content)) {
$build = array_merge($build, $module_content);
$build = array_merge_recursive($build, $module_content);
}
}