diff --git a/views/includes/head.pug b/views/includes/head.pug index 909a72f..d23d899 100644 --- a/views/includes/head.pug +++ b/views/includes/head.pug @@ -70,10 +70,12 @@ meta(name="viewport", content="width=device-width, initial-scale=1.0") } function localize(url) { - let u = new URL(url) - if(u.host === 'www.reddit.com' || u.host === 'reddit.com') { - url = url.replace(u.host, 'teddit.net') - } + try { + let u = new URL(url) + if(u.host === 'www.reddit.com' || u.host === 'reddit.com') { + url = url.replace(u.host, 'teddit.net') + } + } catch(e) { } return url } diff --git a/views/post.pug b/views/post.pug index 6bb3dc4..bf51a7e 100644 --- a/views/post.pug +++ b/views/post.pug @@ -93,7 +93,6 @@ html p YouTube video info: p #{post.media.title} #{post.media.embed_src} p #{post.media.author_name} #{post.media.author_url} - p else if post.media.source === 'external' if post.images