Skip to content

Commit

Permalink
fix: graph disconnect (#2567)
Browse files Browse the repository at this point in the history
* fix: graph disconnect

* fix: changelog
  • Loading branch information
lxfu1 authored Jun 19, 2024
1 parent cd90b78 commit 95bc350
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 6 additions & 0 deletions packages/graphs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.4.2

`2024-06-19`

- 🐞 [Cannot read properties of undefined (reading 'disconnect')](https://github.com/ant-design/ant-design-charts/issues/1925)

## 1.4.0

`2023-02-20`
Expand Down
2 changes: 1 addition & 1 deletion packages/graphs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ant-design/graphs",
"version": "1.4.1",
"version": "1.4.2",
"description": "Relation graph",
"bugs": {
"url": "https://github.com/ant-design/ant-design-charts/issues"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export default class ConversionDagreGraph extends Component<Props, any> {
private graph: G6Graph | null;
private shouldCacheZoomAndTranslate: boolean;
private cacheData;
private resizeObserver: any;

static defaultProps = {
data: null,
Expand Down Expand Up @@ -172,8 +171,6 @@ export default class ConversionDagreGraph extends Component<Props, any> {
if (this.graph && !this.graph?.destroyed) {
// 移除布局完成监听
this.graph.off('afterlayout', this.handleAfterLayout);
// 移除container resize监听
this.resizeObserver.disconnect();
}
};

Expand Down

0 comments on commit 95bc350

Please sign in to comment.