@timardex/cluemart-shared 1.4.91 → 1.4.93

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/dist/index.mjs CHANGED
@@ -3360,10 +3360,14 @@ var useRemoveParticipantFromChat = () => {
3360
3360
  awaitRefetchQueries: true,
3361
3361
  refetchQueries: (mutationResult) => {
3362
3362
  const region = mutationResult?.data?.removeParticipantFromChat?.region;
3363
- return [
3364
- { query: USER_CHATS },
3365
- { query: GET_CHATS_BY_REGION, skip: !region, variables: { region } }
3366
- ];
3363
+ const queries = [{ query: USER_CHATS }];
3364
+ if (region && region.trim() !== "") {
3365
+ queries.push({
3366
+ query: GET_CHATS_BY_REGION,
3367
+ variables: { region }
3368
+ });
3369
+ }
3370
+ return queries;
3367
3371
  }
3368
3372
  });
3369
3373
  return { error, loading, removeParticipantFromChat };