Skip to content

Commit 440d2a4

Browse files
committed
fix: lint
1 parent 405c7e8 commit 440d2a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/api/src/query/screen-resolution-to-device-type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ function parseResolution(screenResolution: string): Resolution | null {
4848
function determineDeviceType(resolution: Resolution): DeviceType {
4949
const { width, aspect } = resolution;
5050

51-
if (width <= 400) {
51+
if (width <= 400 && aspect >= 0.9 && aspect <= 1.1) {
5252
return 'watch';
5353
}
54-
if (width <= 800 && aspect < 1.1) {
54+
if (width <= 800 && (aspect < 0.9 || (aspect >= 1.8 && aspect <= 2.5))) {
5555
return 'mobile';
5656
}
5757
if (width > 800 && width <= 1280 && aspect >= 1.1 && aspect <= 1.7) {

0 commit comments

Comments
 (0)