Skip to content

Commit

Permalink
[BUG] error to save map when a layer is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Viglino committed Oct 24, 2024
1 parent 719540a commit a54fe2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion format/StoryMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ StoryMap.prototype.write = function(story) {
s.layers = [];
s.layerIds.forEach(lid => {
const l = layers.find((layer) => layer.get('id') === lid);
s.layers.push(l.get('title') || l.get('name'))
if (l) {
s.layers.push(l.get('title') || l.get('name'))
}
})
options.etapes['step_'+i] = s;
})
Expand Down

0 comments on commit a54fe2e

Please sign in to comment.