dont reload random topic on home view if random topic exists, fixes #10
This commit is contained in:
parent
4c2a3361eb
commit
9fe634dfd5
|
@ -10,7 +10,7 @@ import Header from "../components/Header";
|
|||
|
||||
class Home extends React.Component {
|
||||
componentDidMount() {
|
||||
if (this.props.allTopics && this.props.allTopics.length > 0) {
|
||||
if (this.props.allTopics && this.props.allTopics.length > 0 && !this.props.randomTopic) {
|
||||
this.props.getRandomTopicVideos(this.props.allTopics);
|
||||
} else {
|
||||
this.props.getAllTopics();
|
||||
|
|
Loading…
Reference in New Issue
Block a user