From ef81534a1726a93327d303017afda3b01dd3f027 Mon Sep 17 00:00:00 2001 From: orangemug Date: Sun, 27 Oct 2019 20:04:57 +0000 Subject: [PATCH] Update map style even if inspectModeEnabled=true --- src/components/map/MapboxGlMap.jsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/map/MapboxGlMap.jsx b/src/components/map/MapboxGlMap.jsx index d5b221f..bed8382 100644 --- a/src/components/map/MapboxGlMap.jsx +++ b/src/components/map/MapboxGlMap.jsx @@ -87,11 +87,9 @@ export default class MapboxGlMap extends React.Component { const metadata = props.mapStyle.metadata || {} MapboxGl.accessToken = metadata['maputnik:mapbox_access_token'] || tokens.mapbox - if(!props.inspectModeEnabled) { - //Mapbox GL now does diffing natively so we don't need to calculate - //the necessary operations ourselves! - this.state.map.setStyle(props.mapStyle, { diff: true}) - } + //Mapbox GL now does diffing natively so we don't need to calculate + //the necessary operations ourselves! + this.state.map.setStyle(props.mapStyle, {diff: true}) } componentDidUpdate(prevProps) {