@contentful/field-editor-location 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -169,9 +169,9 @@ class LocationEditor extends _react.Component {
|
|
|
169
169
|
});
|
|
170
170
|
});
|
|
171
171
|
this.state = {
|
|
172
|
-
localValue: props
|
|
173
|
-
lng: props.value.lon,
|
|
174
|
-
lat: props.value.lat
|
|
172
|
+
localValue: props?.value?.lon || props?.value?.lat ? {
|
|
173
|
+
lng: props.value.lon ?? 0,
|
|
174
|
+
lat: props.value.lat ?? 0
|
|
175
175
|
} : undefined,
|
|
176
176
|
mapsObject: null
|
|
177
177
|
};
|
|
@@ -107,9 +107,9 @@ export class LocationEditor extends React.Component {
|
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
109
|
this.state = {
|
|
110
|
-
localValue: props
|
|
111
|
-
lng: props.value.lon,
|
|
112
|
-
lat: props.value.lat
|
|
110
|
+
localValue: props?.value?.lon || props?.value?.lat ? {
|
|
111
|
+
lng: props.value.lon ?? 0,
|
|
112
|
+
lat: props.value.lat ?? 0
|
|
113
113
|
} : undefined,
|
|
114
114
|
mapsObject: null
|
|
115
115
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-location",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">=16.8.0"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "210dd3d36c166de864391333f6b953f16904ce71"
|
|
52
52
|
}
|