From 2b29c007bcc59e4d2ac3b185cdda282c95770d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Fri, 15 Feb 2019 21:14:37 +0100 Subject: [PATCH] Bugfix --- layout-card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout-card.js b/layout-card.js index 47bd53b..232abcd 100644 --- a/layout-card.js +++ b/layout-card.js @@ -65,7 +65,7 @@ class LayoutCard extends Polymer.Element { } else { let colWidth = this.config.column_width || 300; numcols = Math.max(1, - this.$ ? Math.floor(this.parentElement.clientWidth/this.config.column_width) : 0); + this.parentElement ? Math.floor(this.parentElement.clientWidth/this.config.column_width) : 0); } numcols = Math.min(numcols, this.config.max_columns); if(numcols != this.colnum) {