Fixed getLastModified callback firing three times #130
@ -44,9 +44,11 @@
|
|||||||
http.open('HEAD', location, true);
|
http.open('HEAD', location, true);
|
||||||
|
|
||||||
http.onreadystatechange = function() {
|
http.onreadystatechange = function() {
|
||||||
|
if(http.readyState === http.DONE) {
|
||||||
console.log(http);
|
console.log(http);
|
||||||
console.log(http.getResponseHeader('Last-Modified'));
|
console.log(http.getResponseHeader('Last-Modified'));
|
||||||
callback(http.getResponseHeader('Last-Modified'));
|
callback(http.getResponseHeader('Last-Modified'));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
http.send();
|
http.send();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user