Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #356 from Bayer-Group/HOTFIX-contextProps
Browse files Browse the repository at this point in the history
fix bug where nothing returned from onMapInit promise was not handled
  • Loading branch information
stazrad authored Nov 4, 2021
2 parents a232e21 + 58b1d49 commit c799704
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bayer/ol-kit",
"version": "1.16.0",
"version": "1.16.1",
"license": "BSD",
"description": "Mapping components & utils built with openlayers + react",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/Draw/__snapshots__/DrawContainer.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`<DrawContainer /> should render a basic prebuilt DrawContainer componen
class=\\"sc-gtssRu fBppYk\\"
href=\\"https://ol-kit.com/\\"
target=\\"_blank\\"
title=\\"Powered by ol-kit v1.16.0\\"
title=\\"Powered by ol-kit v1.16.1\\"
>
<svg
viewBox=\\"0 0 204.76 236.44\\"
Expand Down
4 changes: 3 additions & 1 deletion src/Map/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ class Map extends React.Component {
// update AFTER onMapInit to get map into the state/context
isPromise
? initCallback
.then(({ contextProps }) => {
.then((res = {}) => {
const { contextProps = {} } = res

// result of onMapInit may contain contextProps
mapConfig = {
...mapConfig,
Expand Down

0 comments on commit c799704

Please sign in to comment.