Skip to content

Node.js based forum software built for the modern web

adding undefined check to hrefEmpty

Julian Lam186473fa7bb6
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index 2d290e7ac5..3d112f486a 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -253,7 +253,7 @@ var ajaxify = ajaxify || {};
}
function hrefEmpty(href) {
- return href === '' || href === 'javascript:;' || href === window.location.href + "#" || href.slice(-1) === "#";
+ return href === undefined || href === '' || href === 'javascript:;' || href === window.location.href + "#" || href.slice(-1) === "#";
}
// Enhancing all anchors to ajaxify...