Protect hasFeature call.
Thu Oct 28 00:01:20 UTC 2010 pix@kepibu.org
* Protect hasFeature call.
diff -rN -u old-httpauth/form-to-http-auth.js new-httpauth/form-to-http-auth.js
--- old-httpauth/form-to-http-auth.js 2013-07-07 17:29:42.000000000 +0000
+++ new-httpauth/form-to-http-auth.js 2013-07-07 17:29:42.000000000 +0000
@@ -1,7 +1,9 @@
(function () {
function form2httpAuth () {
/* Skip if the browser indicates it does this itself. */
- if (document.implementation.hasFeature("HTTPFormAuth", "1.0"))
+ if (document.implementation &&
+ document.implementation.hasFeature &&
+ document.implementation.hasFeature("HTTPFormAuth", "1.0"))
return true;
/* Attempt login with provided credentials. */