From 8d413670c8bd7f15b06c91bd448c3c4945b6e29f Mon Sep 17 00:00:00 2001 From: Arun Kumar Date: Fri, 19 Mar 2021 01:32:14 +0530 Subject: [PATCH] Remove redundant if statement --- src/components/App.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 42585ec30..c07b6debe 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -525,7 +525,7 @@ class App extends React.Component { let zenModeEnabled = actionResult?.appState?.zenModeEnabled || false; let gridSize = actionResult?.appState?.gridSize || null; let theme = actionResult?.appState?.theme || "light"; - let name = actionResult?.appState?.name || this.state.name; + const name = actionResult?.appState?.name || this.state.name; if (typeof this.props.viewModeEnabled !== "undefined") { viewModeEnabled = this.props.viewModeEnabled; @@ -543,10 +543,6 @@ class App extends React.Component { theme = this.props.theme; } - if (typeof this.props.name !== "undefined") { - name = this.props.name; - } - this.setState( (state) => { // using Object.assign instead of spread to fool TS 4.2.2+ into