Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix: no history no need to collaboration (#1348)
Ran Luo157b4db74fad
diff --git a/packages/docs/src/services/doc-state-change-manager.service.ts b/packages/docs/src/services/doc-state-change-manager.service.tsindex 468e3778b3..4344d7d45d 100644--- a/packages/docs/src/services/doc-state-change-manager.service.ts+++ b/packages/docs/src/services/doc-state-change-manager.service.ts@@ -59,14 +59,16 @@ export class DocStateChangeManagerService extends RxDisposable {}setChangeState(changeState: IDocStateChangeParams) {- const { trigger } = changeState;+ const { trigger, noHistory } = changeState;// No need to emit stateChange when the mutation is from collaboration.if (trigger == null) {return;}this._cacheChangeState(changeState);// Mutations by user or historyService need collaboration.- this._docStateChange$.next(changeState);+ if (!noHistory) {+ this._docStateChange$.next(changeState);+ }}private _initialize() {