Skip to content

Node.js based forum software built for the modern web

hotfix to utils.isRelativeUrl to handle null or undefined first argument

Julian Lam20d035bdac7d
diff --git a/public/src/utils.js b/public/src/utils.js
index 42d4b6f3ad..5836e5f04b 100644
--- a/public/src/utils.js
+++ b/public/src/utils.js
@@ -193,7 +193,7 @@
},
isRelativeUrl: function (url) {
- var firstChar = url.slice(0, 1);
+ var firstChar = String(url || '').charAt(0);
return (firstChar === '.' || firstChar === '/');
},