1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Minor tweak for RetrieveETag (#3257)

Need to check if the server responses a null value for ETag.
(In the case testing with build-in webdav server of CarotDAV on Windows 10)
This commit is contained in:
Bram Chen 2018-05-05 18:40:41 +08:00 committed by Jeremy Ruston
parent d4b4c3c936
commit f9be417204

View File

@ -25,8 +25,9 @@ var RetrieveETag = function(self) {
type: "HEAD",
headers: headers,
callback: function(err, data, xhr) {
if(!err) {
self.etag = xhr.getResponseHeader("ETag").replace(/^W\//,"");
var etag = xhr.getResponseHeader("ETag");
if(!err && etag) {
self.etag = etag.replace(/^W\//,"");
}
}
});