mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-22 14:59:26 +01:00
return on empty strings
This commit is contained in:
parent
4228e31ee4
commit
156c7ba40a
@ -168,6 +168,9 @@ module.exports = function(request, fs) {
|
||||
}
|
||||
|
||||
this.replacePrivacyDomains = (str, user_preferences) => {
|
||||
if(typeof(str) == 'undefined' || !str)
|
||||
return
|
||||
|
||||
let redditRegex = /([A-z.]+\.)?(reddit(\.com)|redd(\.it))/gm;
|
||||
let youtubeRegex = /([A-z.]+\.)?youtu(be\.com|\.be)/gm;
|
||||
let twitterRegex = /([A-z.]+\.)?twitter\.com/gm;
|
||||
|
Loading…
Reference in New Issue
Block a user