Added protection against unknown image sizes
This commit is contained in:
parent
21ddb8a90b
commit
2ab636e569
1 changed files with 2 additions and 3 deletions
|
@ -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 %>">
|
||||||
|
|
Loading…
Reference in a new issue