@mocanvas/editor 4.8.1 → 4.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8213,10 +8213,8 @@ var Editor = class extends EventEmitter {
8213
8213
  * state of the document. A sync binding published that state to its peers.
8214
8214
  */
8215
8215
  run(fn, opts = {}) {
8216
- return this.store.atomic(() => {
8217
- if (opts.history === "ignore") return this.history.ignore(fn);
8218
- return fn();
8219
- });
8216
+ if (opts.history === "ignore") return this.history.ignore(() => this.store.atomic(fn));
8217
+ return this.store.atomic(fn);
8220
8218
  }
8221
8219
  /** @deprecated use `run` */
8222
8220
  batch(fn) {