Skip to content

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.

fix: remove style in cache map (#6339)

Jelf780d801c2b48
diff --git a/packages/core/src/sheets/styles.ts b/packages/core/src/sheets/styles.ts
index 33e85b9ddf..ea835de719 100644
--- a/packages/core/src/sheets/styles.ts
+++ b/packages/core/src/sheets/styles.ts
@@ -93,9 +93,10 @@ export class Styles {
}
remove(id: string): void {
- if (this._styles[id]) {
+ const s = this._styles[id];
+ if (s) {
delete this._styles[id];
- this._cacheMap.delete(JSON.stringify(this._styles[id]));
+ this._cacheMap.delete(JSON.stringify(s));
}
}