Skip to content

Commit

Permalink
chore: check if a user agent is present to prevent exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Nov 17, 2023
1 parent 172721e commit 7bb2cd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/ColdTrick/WidgetManager/WidgetsSettingsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function showLazyLoaded(\WidgetManagerWidget $widget, array $layout_info

if ($widget->column < $first_column_with_data) {
$mobile_detect = new \Detection\MobileDetect();
if ($mobile_detect->isMobile()) {
if ($mobile_detect->hasUserAgent() && $mobile_detect->isMobile()) {
return true;
}
}
Expand Down

0 comments on commit 7bb2cd3

Please sign in to comment.