test for existence of navigator

This commit is contained in:
minj
2014-02-23 07:48:15 +02:00
parent f74718a62c
commit c71508b5e2
+4 -2
View File
@@ -14,12 +14,14 @@
var saveAs = saveAs var saveAs = saveAs
// IE 10+ (native saveAs) // IE 10+ (native saveAs)
|| (navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) || (typeof navigator !== "undefined" &&
navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator))
// Everyone else // Everyone else
|| (function(view) { || (function(view) {
"use strict"; "use strict";
// IE <10 is explicitly unsupported // IE <10 is explicitly unsupported
if (/MSIE [1-9]\./.test(navigator.userAgent)) { if (typeof navigator !== "undefined" &&
/MSIE [1-9]\./.test(navigator.userAgent)) {
return; return;
} }
var var