Skip to content

Commit

Permalink
fix: fix issue canvas cannot destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarebecca committed Oct 24, 2024
1 parent 46a5109 commit 880ff7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/g-lite/src/utils/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ export function cleanExistedCanvas(
typeof container === 'string'
? document.getElementById(container)
: container;

if (CANVAS_Map.has($dom)) CANVAS_Map.get($dom).destroy(cleanUp);
else CANVAS_Map.set($dom, canvas);
CANVAS_Map.set($dom, canvas);
}
}

Expand Down

0 comments on commit 880ff7b

Please sign in to comment.