Skip to content

Commit

Permalink
Merge pull request #506 from antvis/fix/empty-object
Browse files Browse the repository at this point in the history
feat: update
  • Loading branch information
pomelo-nwu authored Aug 19, 2023
2 parents 52e242f + ae05a4d commit 44836d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/graphin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/graphin",
"version": "2.7.24",
"version": "2.7.25",
"description": "the react toolkit for graph analysis based on g6",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/graphin/src/behaviors/useBehaviorHook.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isEmpty } from 'lodash-es';
import React from 'react';
import GraphinContext from '../GraphinContext';

Expand All @@ -14,7 +15,7 @@ const useBehaviorHook = (params: Props) => {
const { disabled, ...otherConfig } = userProps;

React.useEffect(() => {
if (!graph || graph.destroyed) {
if (!graph || graph.destroyed || isEmpty(graph)) {
return;
}
/** 保持单例 */
Expand Down

0 comments on commit 44836d9

Please sign in to comment.