diff client/src/components/fairway/Fairwayprofile.vue @ 1588:2888bfacd331

fairwayprofile: do not try to render fairwayprofile without dimensions
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 14 Dec 2018 11:24:50 +0100
parents 0ded4c56978e
children a08e0f532304
line wrap: on
line diff
--- a/client/src/components/fairway/Fairwayprofile.vue	Fri Dec 14 11:20:08 2018 +0100
+++ b/client/src/components/fairway/Fairwayprofile.vue	Fri Dec 14 11:24:50 2018 +0100
@@ -212,6 +212,7 @@
         height,
         width
       );
+      if (!this.height || !this.width) return; // do not try to render when height and width are unknown
       this.drawWaterlevel({ graph, xScale, yScaleRight, height });
       this.drawLabels({ graph, height });
       this.drawFairway({ graph, xScale, yScaleRight });