fix: a derp

This commit is contained in:
Julian Lam
2020-11-23 14:18:49 -05:00
parent 4ca62dc45b
commit 5dd3b03125

View File

@@ -24,7 +24,7 @@ module.exports = function (Topics) {
Topics.resizeAndUploadThumb = async function (data) {
// Handle protocol-relative URLs
if (data.thumb.startsWith('//')) {
if (data.thumb && data.thumb.startsWith('//')) {
data.thumb = `${nconf.get('secure') ? 'https' : 'http'}:${data.thumb}`;
}