website: improve autoreload-in-debug helper

This commit is contained in:
Rasmus Andersson 2019-02-02 17:05:54 -08:00
parent 824df95754
commit 118377c5ed

View file

@ -29,7 +29,7 @@ function check() {
//console.log('current_etag:', current_etag, 'found_etag:', found_etag); //console.log('current_etag:', current_etag, 'found_etag:', found_etag);
if (current_etag === null) { if (current_etag === null) {
current_etag = found_etag; current_etag = found_etag;
} else if (found_etag !== current_etag) { } else if (found_etag && found_etag !== current_etag) {
document.location.search = document.location.search =
'?etag=' + encodeURIComponent(found_etag) + '?etag=' + encodeURIComponent(found_etag) +
'&scrolly=' + window.scrollY; '&scrolly=' + window.scrollY;