fix empty community in the community list (#13199)
This commit is contained in:
parent
0a18f36623
commit
97bc388ad6
|
@ -49,8 +49,10 @@
|
|||
{:events [::community-resolved]}
|
||||
[{:keys [db] :as cofx} community-id community]
|
||||
(fx/merge cofx
|
||||
{:db (community-resolved db community-id)
|
||||
:dispatch [::cache-link-preview-data (community-link community-id) community]}
|
||||
(cond-> {:db (community-resolved db community-id)}
|
||||
(some? community)
|
||||
(assoc :dispatch [::cache-link-preview-data
|
||||
(community-link community-id) community]))
|
||||
(models.communities/handle-community community)))
|
||||
|
||||
(fx/defn resolve-community-info
|
||||
|
|
|
@ -84,7 +84,8 @@
|
|||
|
||||
(fx/defn handle-community
|
||||
[{:keys [db]} {:keys [id] :as community}]
|
||||
{:db (assoc-in db [:communities id] (<-rpc community))})
|
||||
(when id
|
||||
{:db (assoc-in db [:communities id] (<-rpc community))}))
|
||||
|
||||
(fx/defn handle-communities
|
||||
{:events [::fetched]}
|
||||
|
|
Loading…
Reference in New Issue