Skip to content

Node.js based forum software built for the modern web

check ogImageUrl

barisusaklib08f6073ded6
diff --git a/src/controllers/topics.js b/src/controllers/topics.js
index 8cbd31014d..fd4e6ebc2e 100644
--- a/src/controllers/topics.js
+++ b/src/controllers/topics.js
@@ -41,7 +41,6 @@ topicsController.get = function(req, res, callback) {
}, next);
},
function (results, next) {
-
if (!results.topic.slug) {
return callback();
}
@@ -178,7 +177,7 @@ topicsController.get = function(req, res, callback) {
ogImageUrl = '/logo.png';
}
- if (ogImageUrl.indexOf('http') === -1) {
+ if (typeof ogImageUrl === 'string' && ogImageUrl.indexOf('http') === -1) {
ogImageUrl = nconf.get('url') + ogImageUrl;
}