Fix zoom initialization

This commit is contained in:
Paulo Gustavo Veiga 2022-01-30 08:35:51 -08:00
parent 41fd68a338
commit 0792f47193

View File

@ -58,7 +58,7 @@ const initMindplot = () => {
readOnly: Boolean(global.readOnly || false),
mapId: String(global.mapId),
container: 'mindplot',
zoom: zoomParam | (global.userOptions != undefined ? Number.parseFloat(global.userOptions.zoom as string) : 1),
zoom: zoomParam || (global.userOptions?.zoom != undefined ? Number.parseFloat(global.userOptions.zoom as string) : 0.8),
locale: global.locale,
});