Skip to content

Commit 98d404a

Browse files
committed
use correct API
1 parent 2d1fba7 commit 98d404a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/web/src/app/reducer/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ export const useAppReducer = () => {
238238
if (state.map && state.initialView) {
239239
const { lng, lat, zoom } = state.initialView;
240240
if (lng !== undefined && lat !== undefined && zoom !== undefined) {
241-
state.map.setView([lat, lng], zoom);
241+
state.map.setCenter([lng, lat]);
242+
state.map.setZoom(zoom);
242243
}
243244
}
244245
}, [state.initialView, state.map]);

0 commit comments

Comments
 (0)