mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 16:00:26 +01:00
hotfix to utils.isRelativeUrl to handle null or undefined first argument
This commit is contained in:
@@ -193,7 +193,7 @@
|
||||
},
|
||||
|
||||
isRelativeUrl: function (url) {
|
||||
var firstChar = url.slice(0, 1);
|
||||
var firstChar = String(url || '').charAt(0);
|
||||
return (firstChar === '.' || firstChar === '/');
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user