Merge pull request #540 from matrix-org/rav/fix_npe

Fix NPE in LoggedInView
This commit is contained in:
David Baker 2016-11-07 09:57:46 +00:00 committed by GitHub
commit b86f9f362a
2 changed files with 2 additions and 2 deletions

View file

@ -199,7 +199,7 @@ export default React.createClass({
var topBar; var topBar;
if (this.props.hasNewVersion) { if (this.props.hasNewVersion) {
topBar = <NewVersionBar version={this.props.version} newVersion={this.props.newVersion} topBar = <NewVersionBar version={this.props.version} newVersion={this.props.newVersion}
releaseNotes={this.state.newVersionReleaseNotes} releaseNotes={this.props.newVersionReleaseNotes}
/>; />;
} }
else if (this.props.matrixClient.isGuest()) { else if (this.props.matrixClient.isGuest()) {

View file

@ -26,7 +26,7 @@ import React from 'react';
*/ */
export default function(WrappedComponent) { export default function(WrappedComponent) {
return React.createClass({ return React.createClass({
displayName: "MatrixClient<" + WrappedComponent.displayName + ">", displayName: "WithMatrixClient<" + WrappedComponent.displayName + ">",
contextTypes: { contextTypes: {
matrixClient: React.PropTypes.instanceOf(Matrix.MatrixClient).isRequired, matrixClient: React.PropTypes.instanceOf(Matrix.MatrixClient).isRequired,