Skip to content

Commit

Permalink
Fix Uncaught TypeError (#7820)
Browse files Browse the repository at this point in the history
* Fix Uncaught TypeError
  • Loading branch information
liviuconcioiu authored Sep 11, 2024
1 parent 05dca42 commit 4754955
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -2264,10 +2264,10 @@ protected function parseClientHints(): ?array
$formFactors = $this->clientHints->getFormFactors();

if (\count($formFactors) > 0) {
foreach (self::$clientHintFormFactorsMapping as $formFactor) {
$deviceType = $formFactors[$formFactor] ?? null;
foreach (self::$clientHintFormFactorsMapping as $formFactor => $deviceType) {
$hasDeviceType = $formFactors[$formFactor] ?? null;

if (null !== $deviceType) {
if (null !== $hasDeviceType) {
$deviceType = self::getDeviceName($deviceType);

break;
Expand Down

0 comments on commit 4754955

Please sign in to comment.