From c202889d8d2744aa720d75b48cb920b93c34bc30 Mon Sep 17 00:00:00 2001 From: Sorin Davidoi Date: Sat, 8 Jul 2017 18:34:55 +0200 Subject: [PATCH] fix: Rerender Bundle on route change (#4120) --- .../features/ui/util/react_router_helpers.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/javascript/mastodon/features/ui/util/react_router_helpers.js b/app/javascript/mastodon/features/ui/util/react_router_helpers.js index e33a6df6f4..ede578e560 100644 --- a/app/javascript/mastodon/features/ui/util/react_router_helpers.js +++ b/app/javascript/mastodon/features/ui/util/react_router_helpers.js @@ -31,13 +31,11 @@ export class WrappedRoute extends React.Component { } renderComponent = ({ match }) => { - this.match = match; // Needed for this.renderBundle - - const { component } = this.props; + const { component, content, multiColumn } = this.props; return ( - {this.renderBundle} + {Component => {content}} ); } @@ -50,12 +48,6 @@ export class WrappedRoute extends React.Component { return ; } - renderBundle = (Component) => { - const { match: { params }, props: { content, multiColumn } } = this; - - return {content}; - } - render () { const { component: Component, content, ...rest } = this.props;