sforkowany z mirror/soapbox
Fix navigating between profiles
rodzic
3414363245
commit
dc363cd04b
|
@ -21,7 +21,7 @@ import { FormattedMessage } from 'react-intl';
|
||||||
const mapStateToProps = (state, { params, withReplies = false }) => {
|
const mapStateToProps = (state, { params, withReplies = false }) => {
|
||||||
const username = params.username || '';
|
const username = params.username || '';
|
||||||
const me = state.get('me');
|
const me = state.get('me');
|
||||||
const accountFetchError = (state.getIn(['accounts', -1, 'username'], '').toLowerCase() === username.toLowerCase());
|
const accountFetchError = ((state.getIn(['accounts', -1, 'username']) || '').toLowerCase() === username.toLowerCase());
|
||||||
|
|
||||||
let accountId = -1;
|
let accountId = -1;
|
||||||
let accountUsername = username;
|
let accountUsername = username;
|
||||||
|
|
|
@ -27,7 +27,7 @@ const makeMapStateToProps = () => {
|
||||||
const mapStateToProps = (state, { params, withReplies = false }) => {
|
const mapStateToProps = (state, { params, withReplies = false }) => {
|
||||||
const username = params.username || '';
|
const username = params.username || '';
|
||||||
const me = state.get('me');
|
const me = state.get('me');
|
||||||
const accountFetchError = (state.getIn(['accounts', -1, 'username'], '').toLowerCase() === username.toLowerCase());
|
const accountFetchError = ((state.getIn(['accounts', -1, 'username']) || '').toLowerCase() === username.toLowerCase());
|
||||||
const soapboxConfig = getSoapboxConfig(state);
|
const soapboxConfig = getSoapboxConfig(state);
|
||||||
|
|
||||||
let accountId = -1;
|
let accountId = -1;
|
||||||
|
|
|
@ -29,7 +29,7 @@ const mapStateToProps = (state, { params }) => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const accountFetchError = (state.getIn(['accounts', -1, 'username'], '').toLowerCase() === username.toLowerCase());
|
const accountFetchError = ((state.getIn(['accounts', -1, 'username']) || '').toLowerCase() === username.toLowerCase());
|
||||||
|
|
||||||
let accountId = -1;
|
let accountId = -1;
|
||||||
if (accountFetchError) {
|
if (accountFetchError) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import { findAccountByUsername } from 'soapbox/selectors';
|
||||||
const mapStateToProps = (state, { params, withReplies = false }) => {
|
const mapStateToProps = (state, { params, withReplies = false }) => {
|
||||||
const username = params.username || '';
|
const username = params.username || '';
|
||||||
const me = state.get('me');
|
const me = state.get('me');
|
||||||
const accountFetchError = (state.getIn(['accounts', -1, 'username'], '').toLowerCase() === username.toLowerCase());
|
const accountFetchError = ((state.getIn(['accounts', -1, 'username']) || '').toLowerCase() === username.toLowerCase());
|
||||||
|
|
||||||
let accountId = -1;
|
let accountId = -1;
|
||||||
if (accountFetchError) {
|
if (accountFetchError) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ import { findAccountByUsername } from 'soapbox/selectors';
|
||||||
const mapStateToProps = (state, { params, withReplies = false }) => {
|
const mapStateToProps = (state, { params, withReplies = false }) => {
|
||||||
const username = params.username || '';
|
const username = params.username || '';
|
||||||
const me = state.get('me');
|
const me = state.get('me');
|
||||||
const accountFetchError = (state.getIn(['accounts', -1, 'username'], '').toLowerCase() === username.toLowerCase());
|
const accountFetchError = ((state.getIn(['accounts', -1, 'username']) || '').toLowerCase() === username.toLowerCase());
|
||||||
|
|
||||||
let accountId = -1;
|
let accountId = -1;
|
||||||
if (accountFetchError) {
|
if (accountFetchError) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ import { findAccountByUsername } from 'soapbox/selectors';
|
||||||
const mapStateToProps = (state, { params, withReplies = false }) => {
|
const mapStateToProps = (state, { params, withReplies = false }) => {
|
||||||
const username = params.username || '';
|
const username = params.username || '';
|
||||||
const accounts = state.getIn(['accounts']);
|
const accounts = state.getIn(['accounts']);
|
||||||
const accountFetchError = (state.getIn(['accounts', -1, 'username'], '').toLowerCase() === username.toLowerCase());
|
const accountFetchError = ((state.getIn(['accounts', -1, 'username']) || '').toLowerCase() === username.toLowerCase());
|
||||||
const getAccount = makeGetAccount();
|
const getAccount = makeGetAccount();
|
||||||
|
|
||||||
let accountId = -1;
|
let accountId = -1;
|
||||||
|
|
Ładowanie…
Reference in New Issue