Fix issue where iD could crash upon save if user had edits stored before iD 2.15 (close #6496)

This commit is contained in:
Quincy Morgan
2019-06-06 09:20:57 -04:00
parent 3328dfd27e
commit d42cb7b790
+5 -3
View File
@@ -323,9 +323,11 @@ export function coreHistory(context) {
} else {
var s = new Set();
_stack.slice(1, _index + 1).forEach(function(state) {
state.photoOverlaysUsed.forEach(function(photoOverlay) {
s.add(photoOverlay);
});
if (state.photoOverlaysUsed && Array.isArray(state.photoOverlaysUsed)) {
state.photoOverlaysUsed.forEach(function(photoOverlay) {
s.add(photoOverlay);
});
}
});
return Array.from(s);
}