Commit b127cd5a authored by Quoc Huy Nguyen Dinh's avatar Quoc Huy Nguyen Dinh
Browse files

Fix community roles page blank

parent fde9bf06
......@@ -237,7 +237,11 @@ const CommunityRolesWrapped = connect(
(state, ownProps) => {
const { community } = ownProps.params;
const tree = state.community.get(community, Map());
const roles = tree.get('roles', List());
let roles = tree.get('roles', List());
if (typeof roles === 'string') {
roles = List();
}
console.log('roles', roles);
const loading = roles.size == 0;
const updating = tree.get('updatePending', false);
const communityMetadata = state.global.getIn(['community', community]);
......
......@@ -7,6 +7,7 @@ import stateCleaner from 'app/redux/stateCleaner';
import { fetchCrossPosts, augmentContentWithCrossPost } from 'app/utils/CrossPosts';
export async function callBridge(method, params) {
console.log('callbrdige', method, params);
// [JES] Hivemind throws an exception if you call for my/[trending/payouts/new/etc] with a null observer
// so just delete the 'my' tag if there is no observer specified
if (
......@@ -28,6 +29,7 @@ export async function callBridge(method, params) {
&& method !== 'get_post_header'
&& method !== 'list_subscribers'
&& method !== 'normalize_post'
&& method !== 'list_community_roles'
&& (params.observer === null || params.observer === undefined)
) params.observer = $STM_Config.default_observer;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment