Platform detection issue for desktops (Windows-touchscreen)

When my app runs on certain desktops(Windows-touchscreen)the Platform calss doesn’t return ‘desktop’ as platform, instead it returns ‘mobileweb’.
How can I detect platforms accurately for desktops.

My current code is as follows.

image