diff --git a/code/core/src/manager-api/root.tsx b/code/core/src/manager-api/root.tsx index 8d5c501607d6..0889a560c8a0 100644 --- a/code/core/src/manager-api/root.tsx +++ b/code/core/src/manager-api/root.tsx @@ -218,20 +218,10 @@ class ManagerProvider extends Component { return null!; } - shouldComponentUpdate( - nextProps: ManagerProviderProps, - { addons: _, ...nextState }: State - ): boolean { + shouldComponentUpdate(nextProps: ManagerProviderProps, nextState: State): boolean { const prevProps = this.props; - const { addons: __, ...prevState } = this.state; - - if (prevProps.path !== nextProps.path) { - return true; - } - if (!isEqual(prevState, nextState)) { - return true; - } - return false; + const prevState = this.state; + return prevProps.path !== nextProps.path || !isEqual(prevState, nextState); } initModules = () => {