Fix for a production error email I've been seeing, TypeError: navigator.userAgent.match(...) is null from a client that identifies as Safari 9.1.2. I couldn't reproduce the problem in Safari 9 myself, so I'm guessing that it's Firefox with a user agent randomiser.
Also included minor cleanup to avoid running redundant regex matches.
Fix for a production error email I've been seeing,
TypeError: navigator.userAgent.match(...) is null
from a client that identifies as Safari 9.1.2. I couldn't reproduce the problem in Safari 9 myself, so I'm guessing that it's Firefox with a user agent randomiser.Also included minor cleanup to avoid running redundant regex matches.