Skip to content

Commit

Permalink
fix modal crashes when trying to tag a point cloud sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ritch committed Feb 3, 2023
1 parent ca2dd3f commit 732bafa
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/packages/state/src/recoil/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,17 @@ export const pinnedSliceSample = graphQLSelector<
},
};
},
mapResponse: (response) => response.sample,
mapResponse: (response) => {
const actualRawSample = response?.sample?.sample;

if (actualRawSample && typeof actualRawSample === "string") {
return {
...response.sample,
sample: JSON.parse(actualRawSample),
};
}
return response.sample;
},
});

export const groupPaginationFragment = selector<paginateGroup_query$key>({
Expand Down

0 comments on commit 732bafa

Please sign in to comment.