Added protection against unknown image sizes

This commit is contained in:
rr- 2016-01-21 12:15:14 +01:00
parent 21ddb8a90b
commit 2ab636e569

View file

@ -5,10 +5,9 @@
if (post.contentType === 'image' || post.contentType === 'animation' || post.contentType === 'flash') { if (post.contentType === 'image' || post.contentType === 'animation' || post.contentType === 'flash') {
width = post.imageWidth; width = post.imageWidth;
height = post.imageHeight; height = post.imageHeight;
} else {
width = 800;
height = 450;
} }
if (!width) { width = 800; }
if (!height) { height = 450; }
%> %>
<div class="post-content post-type-<%= post.contentType %>"> <div class="post-content post-type-<%= post.contentType %>">