Skip to content

A free, self-hostable news aggregator…

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

Inverleb249b9d0262e
diff --git a/p/scripts/main.js b/p/scripts/main.js
index d165123a6..6b5211bdb 100644
--- a/p/scripts/main.js
+++ b/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;