From 03011c3168c494bf7b4a350ace136b969c04f7ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AD=84=E5=85=B5?= Date: Wed, 31 Jul 2024 10:58:02 +0800 Subject: [PATCH] fix: react-shape this.selectors must valid --- packages/x6-react-shape/src/view.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/x6-react-shape/src/view.ts b/packages/x6-react-shape/src/view.ts index bc1be7371cb..7db0b6d5be9 100644 --- a/packages/x6-react-shape/src/view.ts +++ b/packages/x6-react-shape/src/view.ts @@ -18,9 +18,9 @@ export class ReactShapeView extends NodeView { } getComponentContainer() { - return this.cell.prop('useForeignObject') === false + return this.selectors && (this.cell.prop('useForeignObject') === false ? (this.selectors.content as SVGElement) - : (this.selectors.foContent as HTMLDivElement) + : (this.selectors.foContent as HTMLDivElement)); } confirmUpdate(flag: number) {