Skip to content

ref(global-header): Remove dead code #12767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2019
Merged

Conversation

lynnagara
Copy link
Member

Mark prop as required. Since this.props.projects is never falsy, remove
unused code path

Mark prop as required. Since this.props.projects is never falsy, remove
unused code path
@lynnagara lynnagara requested a review from a team April 12, 2019 20:18
@@ -302,14 +302,13 @@ class GlobalSelectionHeader extends React.Component {

getProjects = () => {
const {isSuperuser} = ConfigStore.get('user');
const {projects, organization} = this.props;
const unfilteredProjects = projects || organization.projects;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Chrissy I seem to recall this being here for a reason, do you remember why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably a relic of before the component was wrapped in withProjects

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the commit that introduced the behavior 109ba9c

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah afaik this is a relic. there is similar looking code in projectSelector that is important because it can either receive projects as a prop or get it from the state, but this is not that.

@lynnagara lynnagara requested a review from a team April 15, 2019 18:46
@lynnagara lynnagara merged commit f41ab3b into master Apr 15, 2019
@lynnagara lynnagara deleted the ref/remove-unused-code branch April 15, 2019 19:39
jan-auer added a commit that referenced this pull request Apr 16, 2019
* master: (50 commits)
  fix(ui) Don't show save-org-search on event search (#12785)
  ref(ui): Remove some unnecessary index.jsx files (#12606)
  feat(app-platform): Analytics (#12718)
  ref(js): Remove ApiMixin (#12384)
  test(js): Silence project plugin console info spam (#12761)
  test(js): Move SaveSearchStore.reset() (#12769)
  test(js): Add more fields to Group fixture (#12759)
  feat(app-platform): Integration "Learn More" modal (#12638)
  feat(saved-searches) Move create saved search button to search bar. (#12781)
  ref(global-header): Remove dead code (#12767)
  ref(releases): Refactored Releases Serializers (#12535)
  feat(app-platform): Sort Integrations (#12697)
  ref(audit-log): Log sso config updates (#12744)
  ref(app-platform): New 'Open In' UI  (#12621)
  feat(events): Use SnubaEvent if option is turned on (#12594)
  feat(global-selection-header): show settings icon link in single project mode (#12772)
  refs(api): Consolidate all search backend code into `SnubaSearchBackend`
  fix(tests) Remove large snapshots (#12766)
  fix: Update symbolicator snapshots (#12710)
  ref: Upgrade semaphore (#12751)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants