Skip to content

Commit

Permalink
Merge pull request #9342 from camptocamp/objectediting-fix-no-geom-ge…
Browse files Browse the repository at this point in the history
…o-7330

The clone can be null
  • Loading branch information
sbrunner authored May 14, 2024
2 parents ec17c46 + 1a243e9 commit 80c0192
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/objectediting/component.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2016-2023 Camptocamp SA
// Copyright (c) 2016-2024 Camptocamp SA
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -586,10 +586,6 @@ Controller.prototype.undo = function () {

this.geometryChanges_.pop();
const clone = cloneGeometry(this.geometryChanges_[this.geometryChanges_.length - 1]);
if (!clone) {
throw new Error('Missing clone');
}

this.feature.setGeometry(clone);

this.skipGeometryChange_ = false;
Expand Down

0 comments on commit 80c0192

Please sign in to comment.