Closed djnym closed 11 years ago
This makes it hard as now sometimes you get a binary, sometimes you get an integer, so for instance
ua_classifier:classify ("Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; Nokia; Lumia 710)"). {ok,[{is_desktop,false}, {is_crawler,false}, {is_wireless_device,true}, {is_tablet,false}, {ajax_support_javascript,true}, {device_os,<<"Windows Phone OS">>}, {displayWidth,480}, {displayHeight,800}, {inputDevices,<<"touchscreen">>}, {parentId,<<"genericNokia">>}, {model,710}, {vendor,<<"Nokia">>}, {id,<<"Lumia710">>}]}
I worked around it application code, but it seems like you might want to have a special case where model is always a binary (seems like you just use make_value in a loop, so you'd have to have a special case for the model key I guess).
:+1:
I don't see any reason, API-wise, why model would be an integer.
Thanks for reporting this issue. You were the first :)
This makes it hard as now sometimes you get a binary, sometimes you get an integer, so for instance
ua_classifier:classify ("Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; Nokia; Lumia 710)"). {ok,[{is_desktop,false}, {is_crawler,false}, {is_wireless_device,true}, {is_tablet,false}, {ajax_support_javascript,true}, {device_os,<<"Windows Phone OS">>}, {displayWidth,480}, {displayHeight,800}, {inputDevices,<<"touchscreen">>}, {parentId,<<"genericNokia">>}, {model,710}, {vendor,<<"Nokia">>}, {id,<<"Lumia710">>}]}
I worked around it application code, but it seems like you might want to have a special case where model is always a binary (seems like you just use make_value in a loop, so you'd have to have a special case for the model key I guess).