Skip to content

Commit

Permalink
[BUG] undoredo and layergroup #1097
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed Aug 12, 2024
1 parent da0087f commit 109947e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/interaction/UndoRedo.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,11 @@ var ol_interaction_UndoRedo = class olinteractionUndoRedo extends ol_interaction

// Ges vector layers
function getVectorLayers(layers, init) {
if (!init)
if (!init) {
init = []
}
layers.forEach(function (l) {
if (l.getSource() instanceof ol_source_Vector) {
if (l.getSource && l.getSource() instanceof ol_source_Vector) {
if (!self._layers || self._layers.indexOf(l) >= 0) {
init.push(l)
}
Expand Down

0 comments on commit 109947e

Please sign in to comment.