You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
Hi, there!
I have following error when try to parse user agent:
TypeError: Cannot read property '1' of null
at Object.parse (node_modules/platform/platform.js:783:54)
My user agent is "todotogo/6 (iPhone Simulator; iOS 6.0; Scale/1.00)".
This user agent is auto generated by AFNetworking (https://github.com/AFNetworking/AFNetworking) library.
It would be great if platform.parse method just return null or undefined if he can't parse browser name, version, etc.
The text was updated successfully, but these errors were encountered:
We are using the current version of Platform (1.0.0) -- though I just realised that that doesn't include the code update 3 months ago, probably because the version number wasn't increased -- to determine the CSP headers supported by the client's browser. In rare cases platform.js causes this exception on line 796 because layout is set to null in line 258.
We didn't log the user agent string that caused this issue but an unknown user agent should certainly not lead to a crash. @terinjokes suggestion would solve this particular crash but layout is assumed to be an array in other places too.
Hi, there!
I have following error when try to parse user agent:
My user agent is "todotogo/6 (iPhone Simulator; iOS 6.0; Scale/1.00)".
This user agent is auto generated by AFNetworking (https://github.com/AFNetworking/AFNetworking) library.
It would be great if platform.parse method just return null or undefined if he can't parse browser name, version, etc.
The text was updated successfully, but these errors were encountered: