Browse Source

Fix JS error when Navigation API is not present (#8524)

Closes https://github.com/FreshRSS/FreshRSS/issues/8511
Inverle 1 month ago
parent
commit
b249b9d026
1 changed files with 3 additions and 0 deletions
  1. 3 0
      p/scripts/main.js

+ 3 - 0
p/scripts/main.js

@@ -2360,6 +2360,9 @@ function init_main_beforeDOM() {
 }
 
 function init_navigation_handler() {
+	if (!('navigation' in window)) {
+		return;
+	}
 	navigation.addEventListener('navigate', (e) => {
 		if (!(e.canIntercept && e.hashChange && e.navigationType === 'traverse')) {
 			return;