forked from treehouse/mastodon
parent
e3a1955276
commit
01c169e796
|
@ -142,7 +142,7 @@ export function submitCompose(routerHistory) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (response.data.visibility === 'direct' && getState().getIn(['conversations', 'mounted']) <= 0) {
|
if (response.data.visibility === 'direct' && getState().getIn(['conversations', 'mounted']) <= 0 && routerHistory) {
|
||||||
routerHistory.push('/timelines/direct');
|
routerHistory.push('/timelines/direct');
|
||||||
} else if (response.data.visibility !== 'direct') {
|
} else if (response.data.visibility !== 'direct') {
|
||||||
insertIfOnline('home');
|
insertIfOnline('home');
|
||||||
|
|
|
@ -88,7 +88,7 @@ class ComposeForm extends ImmutablePureComponent {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.props.onSubmit(this.context.router.history);
|
this.props.onSubmit(this.context.router ? this.context.router.history : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
onSuggestionsClearRequested = () => {
|
onSuggestionsClearRequested = () => {
|
||||||
|
|
Loading…
Reference in New Issue