From 8163dcb0ab6a70119a244b145a17fe9249ce8b01 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 16 Feb 2023 14:29:17 +0000 Subject: [PATCH] Prevent warnings about assigning undefined values --- plugins/feature/map/map/map.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/feature/map/map/map.qml b/plugins/feature/map/map/map.qml index c120bc871..193b2d95a 100644 --- a/plugins/feature/map/map/map.qml +++ b/plugins/feature/map/map/map.qml @@ -239,7 +239,8 @@ Item { anchorPoint.x: image.width/2 anchorPoint.y: image.height/2 coordinate: position - zoomLevel: mapZoomLevel > mapImageMinZoom ? mapZoomLevel : mapImageMinZoom + // when zooming, mapImageMinZoom can be temporarily undefined. Not sure why + zoomLevel: (typeof mapImageMinZoom !== 'undefined') ? (mapZoomLevel > mapImageMinZoom ? mapZoomLevel : mapImageMinZoom) : zoomLevel autoFadeIn: false // not in 5.12 sourceItem: Grid {