Skip to content

Commit

Permalink
fix: return no spaces when controller is empty (#860)
Browse files Browse the repository at this point in the history
* fix: return no spaces when controller is empty

* Update src/graphql/helpers.ts

Co-authored-by: Chaitanya <[email protected]>

---------

Co-authored-by: Chaitanya <[email protected]>
  • Loading branch information
wa0x6e and ChaituVR authored Jun 4, 2024
1 parent 960c18a commit 5c7af9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/graphql/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ export async function fetchSpaces(args) {

const fields = { id: 'string', created: 'number' };

if (where.controller) {
if ('controller' in where) {
if (!where.controller) return [];

where.id_in = await getControllerDomains(where.controller);

delete where.controller;
Expand Down

0 comments on commit 5c7af9c

Please sign in to comment.