Browse Source

Clear undo cache with noUndo

pull/3487/head
Artur Arseniev 5 years ago
parent
commit
2ea8e7240e
  1. 7
      src/undo_manager/index.js

7
src/undo_manager/index.js

@ -73,9 +73,10 @@ export default () => {
on(object, v, opts) { on(object, v, opts) {
!beforeCache && (beforeCache = object.previousAttributes()); !beforeCache && (beforeCache = object.previousAttributes());
const opt = opts || v || {}; const opt = opts || v || {};
setTimeout(() => { opt.noUndo &&
beforeCache = null; setTimeout(() => {
}); beforeCache = null;
});
if (hasSkip(opt)) { if (hasSkip(opt)) {
return; return;
} else { } else {

Loading…
Cancel
Save