We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 405c7e8 commit 440d2a4Copy full SHA for 440d2a4
apps/api/src/query/screen-resolution-to-device-type.ts
@@ -48,10 +48,10 @@ function parseResolution(screenResolution: string): Resolution | null {
48
function determineDeviceType(resolution: Resolution): DeviceType {
49
const { width, aspect } = resolution;
50
51
- if (width <= 400) {
+ if (width <= 400 && aspect >= 0.9 && aspect <= 1.1) {
52
return 'watch';
53
}
54
- if (width <= 800 && aspect < 1.1) {
+ if (width <= 800 && (aspect < 0.9 || (aspect >= 1.8 && aspect <= 2.5))) {
55
return 'mobile';
56
57
if (width > 800 && width <= 1280 && aspect >= 1.1 && aspect <= 1.7) {
0 commit comments