Skip to content
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

GH-2186: Hub Home view bug fix #628

Merged
merged 4 commits into from Oct 28, 2020
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Prev

Fix Hub Home view breaking bug

  • Loading branch information
wlycdgr committed Oct 27, 2020
commit 3d93154491e4561a5931fe5c71af4b0a7909b6a1
@@ -200,12 +200,13 @@ PromoModal.propTypes = {
type: PropTypes.string.isRequired,
location: PropTypes.string,
isPlus: PropTypes.bool,
tab_id: PropTypes.number.isRequired,
tab_id: PropTypes.number,
};

PromoModal.defaultProps = {
location: 'panel',
isPlus: false,
tab_id: null,
};

export default PromoModal;
@@ -14,6 +14,7 @@
import { connect } from 'react-redux';
import PromoModalContainer from './PromoModalContainer';

const mapStateToProps = state => ({ tab_id: state.panel.tab_id });
// We may be in the Hub, where state.panel may be undefined
const mapStateToProps = state => ({ tab_id: ((state.panel && state.panel.tab_id) || null) });

export default connect(mapStateToProps, undefined)(PromoModalContainer);
ProTip! Use n and p to navigate between commits in a pull request.