From a3fbe40b26cab715cf14bd534e71e50869c51c8a Mon Sep 17 00:00:00 2001 From: David Luzar Date: Sun, 17 Apr 2022 22:47:36 +0200 Subject: [PATCH] fix: eraser cursor showing on theme change when not using eraser (#4990) --- src/components/App.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index a4349a6c..ec927179 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1072,7 +1072,10 @@ class App extends React.Component { activeTool: { ...this.state.activeTool, type: "selection" }, }); } - if (prevState.theme !== this.state.theme) { + if ( + this.state.activeTool.type === "eraser" && + prevState.theme !== this.state.theme + ) { setEraserCursor(this.canvas, this.state.theme); } // Hide hyperlink popup if shown when element type is not selection