From 300c433fe3f3615b3d8cfcea9b97e8930c95c1ea Mon Sep 17 00:00:00 2001 From: Sebastian Helzle Date: Thu, 26 Apr 2018 14:53:51 +0200 Subject: [PATCH] BUGFIX: Prevent error when image height is zero This can happen with SVGs --- Resources/Private/Fusion/ContentElements/Image.fusion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Private/Fusion/ContentElements/Image.fusion b/Resources/Private/Fusion/ContentElements/Image.fusion index aabf5d0..6049788 100644 --- a/Resources/Private/Fusion/ContentElements/Image.fusion +++ b/Resources/Private/Fusion/ContentElements/Image.fusion @@ -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')}