Browse Source

ref(js): Better error in useTeams for missing org context (#62451)

It's not just that it's not in context. It can also be that the
organizxation isn't set in the store (usually happens in tests)
Evan Purkhiser 1 year ago
parent
commit
a7f9d76895
1 changed files with 3 additions and 1 deletions
  1. 3 1
      static/app/utils/useTeams.tsx

+ 3 - 1
static/app/utils/useTeams.tsx

@@ -267,7 +267,9 @@ export function useTeams({limit, slugs, provideUserTeams}: Options = {}) {
 
       if (orgId === undefined) {
         // eslint-disable-next-line no-console
-        console.error('Cannot fetch teams without an organization in context');
+        console.error(
+          'Cannot fetch teams without an organization in context and in the Store'
+        );
         return;
       }