Skip to content

Commit

Permalink
fix router
Browse files Browse the repository at this point in the history
  • Loading branch information
patrykkopycinski committed Dec 22, 2019
1 parent 424c2ff commit dcdf93e
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import React from 'react';
import { isClassComponent } from 'recompose';
import PropTypes from 'prop-types';
import { routerProvider } from '../../lib/router_provider';
import { getAppState } from '../../lib/app_state';
Expand Down Expand Up @@ -98,9 +97,6 @@ export class Router extends React.PureComponent {
return React.createElement(CanvasLoading, { msg: this.props.loadingMessage });
}

// show the activeComponent
return isClassComponent(this.state.activeComponent)
? React.createElement(this.state.activeComponent, {})
: this.state.activeComponent({});
return <this.state.activeComponent />;
}
}

0 comments on commit dcdf93e

Please sign in to comment.