mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 03:42:10 +03:00
Merge pull request #1106 from esteemapp/bugfix/undefinedpost
try to fix undefined poosts routing
This commit is contained in:
commit
e9aeb5227b
@ -11,7 +11,7 @@ import { injectIntl } from 'react-intl';
|
|||||||
import { NavigationActions } from 'react-navigation';
|
import { NavigationActions } from 'react-navigation';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import EStyleSheet from 'react-native-extended-stylesheet';
|
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||||
import forEach from 'lodash/forEach';
|
import { forEach, isEmpty, some } from 'lodash';
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
import AUTH_TYPE from '../../../constants/authType';
|
import AUTH_TYPE from '../../../constants/authType';
|
||||||
@ -384,13 +384,15 @@ class ApplicationContainer extends Component {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const navigateAction = NavigationActions.navigate({
|
if (!some(params, isEmpty)) {
|
||||||
routeName,
|
const navigateAction = NavigationActions.navigate({
|
||||||
params,
|
routeName,
|
||||||
key,
|
params,
|
||||||
action: NavigationActions.navigate({ routeName }),
|
key,
|
||||||
});
|
action: NavigationActions.navigate({ routeName }),
|
||||||
dispatch(navigateAction);
|
});
|
||||||
|
dispatch(navigateAction);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Alert } from 'react-native';
|
import { Alert } from 'react-native';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import get from 'lodash/get';
|
import { get, some, isEmpty } from 'lodash';
|
||||||
import { injectIntl } from 'react-intl';
|
import { injectIntl } from 'react-intl';
|
||||||
|
|
||||||
// Actions and Services
|
// Actions and Services
|
||||||
@ -87,7 +87,7 @@ class NotificationContainer extends Component {
|
|||||||
dispatch(updateUnreadActivityCount(result.unread));
|
dispatch(updateUnreadActivityCount(result.unread));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (permlink) {
|
if (permlink && author) {
|
||||||
routeName = ROUTES.SCREENS.POST;
|
routeName = ROUTES.SCREENS.POST;
|
||||||
key = permlink;
|
key = permlink;
|
||||||
params = {
|
params = {
|
||||||
|
Loading…
Reference in New Issue
Block a user