mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-23 08:39:56 +02:00
filter validations early in history
Follow @wonga00's comment in https://github.com/openstreetmap/iD/pull/5627
This commit is contained in:
@@ -40,6 +40,7 @@ export function coreHistory(context) {
|
||||
var _stack;
|
||||
var _index;
|
||||
var _tree;
|
||||
var validations = _filter(Validations, _isFunction);
|
||||
|
||||
|
||||
// internal _act, accepts list of actions and eased time
|
||||
@@ -282,7 +283,7 @@ export function coreHistory(context) {
|
||||
|
||||
validate: function(changes) {
|
||||
return _flatten(_map(
|
||||
_filter(Validations, _isFunction),
|
||||
validations,
|
||||
function(fn) {
|
||||
return fn(context)(changes, _stack[_index].graph);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user