Skip to content

Commit

Permalink
Don't ignore addon state as it may be relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
ghengeveld committed Dec 18, 2024
1 parent b2ad07e commit 8e2e08f
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions code/core/src/manager-api/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,10 @@ class ManagerProvider extends Component<ManagerProviderProps, State> {
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 = () => {
Expand Down

0 comments on commit 8e2e08f

Please sign in to comment.