Fix JS error when posting from page without router context (#9073)
Fix #9057
This commit is contained in:
parent
e3a1955276
commit
01c169e796
2 changed files with 2 additions and 2 deletions
|
@ -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');
|
||||
} else if (response.data.visibility !== 'direct') {
|
||||
insertIfOnline('home');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue