Skip to content

Node.js based forum software built for the modern web

fix: a derp

Julian Lam5dd3b03125d6
diff --git a/src/topics/thumb.js b/src/topics/thumb.js
index b948a34631..15574779e6 100644
--- a/src/topics/thumb.js
+++ b/src/topics/thumb.js
@@ -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}`;
}