Skip to content

Commit 3c17932

Browse files
author
Mark Bradshaw
committed
Remove isLocal
1 parent be338cc commit 3c17932

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/index.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ function createActiveXHR() {
2323
} catch( e ) {}
2424
}
2525

26-
var isLocal = window.location.protocol === "file:";
27-
2826
// Create the request object
2927
var createXHR = window.ActiveXObject ?
3028
/* Microsoft failed to properly
@@ -34,7 +32,7 @@ var createXHR = window.ActiveXObject ?
3432
* we need a fallback.
3533
*/
3634
function() {
37-
return !isLocal && createStandardXHR() || createActiveXHR();
35+
return createStandardXHR() || createActiveXHR();
3836
} :
3937
// For all other browsers, use the standard XMLHttpRequest object
4038
createStandardXHR;
@@ -76,7 +74,7 @@ JSZipUtils.getBinaryContent = function(path, callback) {
7674
var file, err;
7775
// use `xhr` and not `this`... thanks IE
7876
if (xhr.readyState === 4) {
79-
if (xhr.status === 200 || (isLocal && xhr.status !== 404)) {
77+
if (xhr.status === 200 || xhr.status === 0) {
8078
file = null;
8179
err = null;
8280
try {

0 commit comments

Comments
 (0)