mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-05 01:26:18 +00:00
Fix undefined xhr bug (#3262)
Closes #3261
Bug introduced in commit f9be41720
("Minor tweak for RetrieveETag
(#3257)", 2018-05-05)
This commit is contained in:
parent
a2606781b7
commit
230c13129a
@ -25,11 +25,11 @@ var RetrieveETag = function(self) {
|
|||||||
type: "HEAD",
|
type: "HEAD",
|
||||||
headers: headers,
|
headers: headers,
|
||||||
callback: function(err, data, xhr) {
|
callback: function(err, data, xhr) {
|
||||||
|
if(err) return;
|
||||||
var etag = xhr.getResponseHeader("ETag");
|
var etag = xhr.getResponseHeader("ETag");
|
||||||
if(!err && etag) {
|
if(!etag) return;
|
||||||
self.etag = etag.replace(/^W\//,"");
|
self.etag = etag.replace(/^W\//,"");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user