fixed missing thumbnail issue

This commit is contained in:
bill bittner 2017-12-07 14:29:17 -08:00
parent 738a517738
commit 616d873508

View file

@ -58,8 +58,10 @@ function determineOgDescription (storedDescription, defaultDescription) {
};
function determineOgThumbnailContentType (thumbnail) {
if (thumbnail.lastIndexOf('.') !== -1) {
return determineContentTypeFromFileExtension(thumbnail.substring(thumbnail.lastIndexOf('.')));
if (thumbnail) {
if (thumbnail.lastIndexOf('.') !== -1) {
return determineContentTypeFromFileExtension(thumbnail.substring(thumbnail.lastIndexOf('.')));
}
}
return '';
}