Skip to content

Commit eb884ea

Browse files
committed
Categorize phablets as mobile devices, they are not tablets and the line between draws closer to mobiles
1 parent dafa208 commit eb884ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Stages/DeviceDetector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ public function __invoke(PayloadInterface $payload): PayloadInterface
6565
if (! empty($device['type'])) {
6666
if ($device['type'] === 'desktop') {
6767
$payload->setValue('isDesktop', true);
68-
} elseif ($device['type'] === 'tablet' || $device['type'] === 'phablet') {
68+
} elseif ($device['type'] === 'tablet') {
6969
$payload->setValue('isTablet', true);
70-
} elseif ($device['type'] === 'smartphone' || $device['type'] === 'feature phone') {
70+
} elseif ($device['type'] === 'smartphone' || $device['type'] === 'feature phone' || $device['type'] === 'phablet') {
7171
$payload->setValue('isMobile', true);
7272
}
7373
}

0 commit comments

Comments
 (0)