if(transformations.length > 1) {
// In case of real transactions we don't want to run undo on all of transformations if we don't have to.
- stopAt = undefined;
transformations.some(function(t, idx) {
if(!t.undo && t.getChangeRoot().sameNode(doc.root)) {
stopAt = idx;
getNodeByPath: function(path) {
var toret = this.root;
- path.forEach(function(idx) {
+ path.some(function(idx) {
toret = toret.contents()[idx];
+ if(!toret) {
+ return true;
+ }
});
return toret;
},