AngelDoReMi / closure-templates

Automatically exported from code.google.com/p/closure-templates
Apache License 2.0
0 stars 0 forks source link

navigator.userAgent should be checked for undefined #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
From the top of soyutils.js:

// Just enough browser detection for this file.
(function() {
  var ua = navigator.userAgent;
  var isOpera = ua.indexOf('Opera') == 0;
...

If navigator or navigator.userAgent are undefined, this code generates errors.  
This issue will only affect non-browser JavaScript implementations, such as 
node.js.

Navigator and navigator.userAgent should be checked for undefined before 
browser identification is attempted.

Original issue reported on code.google.com by maqr.lol...@gmail.com on 22 Jul 2010 at 10:57

GoogleCodeExporter commented 8 years ago

Original comment by kai.hu...@gmail.com on 25 Oct 2010 at 10:32

GoogleCodeExporter commented 8 years ago

Original comment by kai.hu...@gmail.com on 25 Oct 2010 at 10:32

GoogleCodeExporter commented 8 years ago
Closure Templates has migrated to GitHub: 
https://github.com/google/closure-templates. Please reopen this there if it's 
still an issue.

Original comment by brendan....@gmail.com on 27 Feb 2015 at 12:20