Skip to content

Commit

Permalink
refactor: prevent destructuring error when response is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhan-slurrp committed Aug 4, 2023
1 parent d967bf5 commit 116a07d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/p2p/src/stores/advertiser-page-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class AdvertiserPageStore extends BaseStore {
if (response?.error) {
this.setErrorMessage(response.error);
} else {
const { list } = response?.p2p_advert_list;
const { list } = response?.p2p_advert_list ?? {};

this.setAdverts(list);
this.setHasMoreAdvertsToLoad(list.length >= general_store.list_item_limit);
Expand Down

0 comments on commit 116a07d

Please sign in to comment.