Skip to content

Commit 272a026

Browse files
committed
fix: detection for going to a new page
Ref: #60 (comment)
1 parent 9d04fd3 commit 272a026

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Resources/themes/default/doctum.js.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ var Doctum = {
8484
var testRequest = new XMLHttpRequest();
8585
testRequest.open('HEAD', candidateUrl, false);
8686
testRequest.send();
87-
if (testRequest.status < 200 || testRequest.status > 399) {
87+
if (testRequest.status >= 200 && testRequest.status < 300) {
88+
// The page was found, go to it
8889
window.location = candidateUrl;
8990
} else {
9091
// otherwise reroute to the home page of the new version

0 commit comments

Comments
 (0)