diff --git a/src/components/App.tsx b/src/components/App.tsx index 0d400927..33949c41 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1160,9 +1160,7 @@ class App extends React.Component { if (!this.state.showStats) { trackEvent("dialog", "stats"); } - this.setState({ - showStats: !this.state.showStats, - }); + this.actionManager.executeAction(actionToggleStats); }; setScrollToCenter = (remoteElements: readonly ExcalidrawElement[]) => {