fix: a derp

v1.18.x
Julian Lam 4 years ago
parent 4ca62dc45b
commit 5dd3b03125

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

Loading…
Cancel
Save