Skip to content

Commit

Permalink
The clone can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed May 7, 2024
1 parent f573eda commit 1a243e9
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 1a243e9

Please sign in to comment.