One of our users has this user agent being sent from a desktop device (trying to get more specific information from them): Mozilla/5.0(WindowsNT6.1;rv:31.0)Gecko/20100101Firefox/31.0. Because there are no spaces it is being reported as unknown and set to the default value of phone.
The fix seems as easy as replacing ua.match(/Windows (NT|XP|ME|9)/) with ua.match(/Windows( )?(NT|XP|ME|9)/).
One of our users has this user agent being sent from a desktop device (trying to get more specific information from them): Mozilla/5.0(WindowsNT6.1;rv:31.0)Gecko/20100101Firefox/31.0. Because there are no spaces it is being reported as unknown and set to the default value of phone.
The fix seems as easy as replacing ua.match(/Windows (NT|XP|ME|9)/) with ua.match(/Windows( )?(NT|XP|ME|9)/).