mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
Don't assign variable when not required to do so.
This commit is contained in:
parent
e6d75f6844
commit
54577db8a4
@ -197,10 +197,9 @@ export default createWidget('header', {
|
||||
|
||||
if (state.searchContextType !== contextType) {
|
||||
state.contextEnabled = undefined;
|
||||
state.searchContextType = contextType;
|
||||
}
|
||||
|
||||
state.searchContextType = contextType;
|
||||
|
||||
if (state.contextEnabled === undefined) {
|
||||
if (forceContextEnabled.includes(contextType)) {
|
||||
state.contextEnabled = true;
|
||||
|
Loading…
Reference in New Issue
Block a user