Skip to content

Commit 4f99886

Browse files
Fix transformation clip access
1 parent 643f493 commit 4f99886

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Build/src/apps/georeferencer/util/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function geoJsonExtentFromTransformation(transformation) {
3131
const { params, clip } = transformation;
3232
const points = [
3333
...params.gcps.map((gcp) => gcp.target),
34-
...clip.coordinates[0],
34+
...(clip !== undefined && clip !== null ? clip.coordinates[0] : []),
3535
];
3636

3737
return points.length > 0 ? boundingExtent(points) : null;

Build/src/apps/georeferencer/views/GeoreferenceView/GeoreferenceView.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const parseTransformation = (transformation) => {
3030
return {
3131
map_id: transformation.map_id,
3232
clip:
33-
transformation?.clip !== undefined
33+
transformation?.clip !== undefined && transformation.clip !== null
3434
? {
3535
type: transformation.clip.type,
3636
coordinates: transformation.clip.coordinates,

Resources/Public/Build/plugin-georeferencer.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)