@amityco/ts-sdk 7.8.4-1a2d045.0 → 7.8.4-477b86e.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.8.4-1a2d045.0",
3
+ "version": "7.8.4-477b86e.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",
@@ -330,7 +330,7 @@ declare global {
330
330
  };
331
331
 
332
332
  type CategoryPayload = {
333
- categories: Amity.InternalCategory[];
333
+ categories?: Amity.InternalCategory[];
334
334
  files: Amity.File[];
335
335
  };
336
336
 
@@ -47,11 +47,11 @@ export const queryCategories = async (
47
47
  'query',
48
48
  { ...params, includeDeleted, options } as Amity.Serializable,
49
49
  ];
50
- pushToCache(cacheKey, { categories: categories.map(getResolver('category')), paging });
50
+ pushToCache(cacheKey, { categories: categories?.map(getResolver('category')), paging });
51
51
  }
52
52
 
53
53
  return {
54
- data: categories,
54
+ data: categories ?? [],
55
55
  cachedAt,
56
56
  paging,
57
57
  };