mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-04 19:11:57 +08:00
fix(editor): sentry-624432d8f1e6420ca9c5023a051f4332 (#9342)
Close https://toeverything.sentry.io/issues/6091618868/?project=4506307500179456
This commit is contained in:
@@ -230,14 +230,17 @@ export class MindmapElementModel extends GfxGroupLikeElementModel<MindmapElement
|
|||||||
},
|
},
|
||||||
updateKey: boolean = true
|
updateKey: boolean = true
|
||||||
) {
|
) {
|
||||||
const collapsed = 'collapsed' in options;
|
const hasFromTo = 'to' in options;
|
||||||
const { connector, from, layout } = options;
|
const { connector, from, layout } = options;
|
||||||
|
|
||||||
if (!from.element || (!collapsed && !options.to.element)) {
|
if (!from?.element) {
|
||||||
|
return { outdated: true, cacheKey: '' };
|
||||||
|
}
|
||||||
|
if (hasFromTo && !options.to?.element) {
|
||||||
return { outdated: true, cacheKey: '' };
|
return { outdated: true, cacheKey: '' };
|
||||||
}
|
}
|
||||||
|
|
||||||
const cacheKey = collapsed
|
const cacheKey = !hasFromTo
|
||||||
? `${from.element.xywh}-collapsed-${layout}-${this.style}`
|
? `${from.element.xywh}-collapsed-${layout}-${this.style}`
|
||||||
: `${from.element.xywh}-${options.to.element.xywh}-${layout}-${this.style}`;
|
: `${from.element.xywh}-${options.to.element.xywh}-${layout}-${this.style}`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user