Skip to content

Commit

Permalink
Merge pull request #4 from Sebobo/patch-1
Browse files Browse the repository at this point in the history
BUGFIX: Prevent error when image height is zero
  • Loading branch information
jonnitto authored Apr 27, 2018
2 parents cee8a2a + 300c433 commit 81c7346
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/Private/Fusion/ContentElements/Image.fusion
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prototype(Jonnitto.ImagesInARow:Image) < prototype(Carbon.Image:Tag) {
asset = ${q(node).property('image')}
relation = ${this.asset ? (this.asset.width / this.asset.height) : 1}
relation = ${this.asset && this.asset.height ? (this.asset.width / this.asset.height) : 1}
maximumWidth = ${dimensionsWidth && this.asset ? Math.ceil(dimensionsWidth * this.relation) : false}
alternativeText = ${q(node).property('alternativeText')}
title = ${q(node).property('title')}
Expand Down

0 comments on commit 81c7346

Please sign in to comment.