mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
check ogImageUrl
This commit is contained in:
@@ -41,7 +41,6 @@ topicsController.get = function(req, res, callback) {
|
|||||||
}, next);
|
}, next);
|
||||||
},
|
},
|
||||||
function (results, next) {
|
function (results, next) {
|
||||||
|
|
||||||
if (!results.topic.slug) {
|
if (!results.topic.slug) {
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
@@ -178,7 +177,7 @@ topicsController.get = function(req, res, callback) {
|
|||||||
ogImageUrl = '/logo.png';
|
ogImageUrl = '/logo.png';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ogImageUrl.indexOf('http') === -1) {
|
if (typeof ogImageUrl === 'string' && ogImageUrl.indexOf('http') === -1) {
|
||||||
ogImageUrl = nconf.get('url') + ogImageUrl;
|
ogImageUrl = nconf.get('url') + ogImageUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user