@amityco/ts-sdk 7.9.1-4cf111eb.0 → 7.9.1-7d6c59d.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "7.9.1-4cf111eb.0",
3
+ "version": "7.9.1-7d6c59d.0",
4
4
  "license": "CC-BY-ND-4.0",
5
5
  "author": "amity.co <developers@amity.co> (https://amity.co)",
6
6
  "description": "Amity Social Cloud Typescript SDK",
@@ -59,6 +59,7 @@ export const getCommunity = (
59
59
  ],
60
60
  {
61
61
  callbackDataSelector: (data: Amity.InternalCommunity) => {
62
+ if (!data) return data;
62
63
  return LinkedObject.community(data);
63
64
  },
64
65
  },
@@ -12,13 +12,13 @@ export const communityLinkedObject = (community: Amity.InternalCommunity): Amity
12
12
  return {
13
13
  ...community,
14
14
  get categories(): Amity.Category[] {
15
- return community?.categoryIds
16
- ?.map(categoryId => {
15
+ return (community?.categoryIds ?? [])
16
+ .map(categoryId => {
17
17
  const cacheData = pullFromCache<Amity.Category>(['category', 'get', categoryId]);
18
18
  if (cacheData?.data) return categoryLinkedObject(cacheData.data);
19
19
  return undefined;
20
20
  })
21
- ?.filter(category => !!category);
21
+ .filter(category => !!category);
22
22
  },
23
23
  createInvitations: async (userIds: string[]): Promise<void> => {
24
24
  await createInvitations({