From 2ee98e9fdcaaaa532e6c053d2ce4dd820ab929e7 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 7 Nov 2016 09:23:45 +0000 Subject: [PATCH] Fix NPE in LoggedInView Fixes a NPE displaying the new version bar (also fix displayname for WithMatrixClient) --- src/components/structures/LoggedInView.js | 2 +- src/wrappers/WithMatrixClient.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index 602cf52e06..e006f6ee3f 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -199,7 +199,7 @@ export default React.createClass({ var topBar; if (this.props.hasNewVersion) { topBar = ; } else if (this.props.matrixClient.isGuest()) { diff --git a/src/wrappers/WithMatrixClient.js b/src/wrappers/WithMatrixClient.js index d8ccb3ff2d..c9c9e7adb7 100644 --- a/src/wrappers/WithMatrixClient.js +++ b/src/wrappers/WithMatrixClient.js @@ -26,7 +26,7 @@ import React from 'react'; */ export default function(WrappedComponent) { return React.createClass({ - displayName: "MatrixClient<" + WrappedComponent.displayName + ">", + displayName: "WithMatrixClient<" + WrappedComponent.displayName + ">", contextTypes: { matrixClient: React.PropTypes.instanceOf(Matrix.MatrixClient).isRequired,