Skip to content

Commit 34855b7

Browse files
kevinjmoPessimistress
authored andcommitted
fix(react-maplibre): guard against undefined map.style in _updateStyleComponents (#2580)
1 parent b07df54 commit 34855b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/react-maplibre/src/maplibre/maplibre.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ export default class Maplibre {
462462
const map = this._map;
463463
const currProps = this._styleComponents;
464464
// We can safely manipulate map style once it's loaded
465-
if (map.style._loaded) {
465+
if (map.style?._loaded) {
466466
if (light && !deepEqual(light, currProps.light)) {
467467
currProps.light = light;
468468
map.setLight(light);

0 commit comments

Comments
 (0)