Skip to content

Commit

Permalink
fix: directories not updating on cursor fetch (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
james-elicx authored Sep 1, 2023
1 parent 44dc111 commit 05b5869
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/providers/object-explorer-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export const ObjectExplorerProvider = ({ children }: Props): JSX.Element => {
return resp.json<R2Objects>();
})
.then((data) => {
updateObjects(data.objects, { cursor: data.truncated ? data.cursor : undefined });
updateObjects([...data.delimitedPrefixes, ...data.objects], {
cursor: data.truncated ? data.cursor : undefined,
});
})
.catch((err) => {
// TODO: Change to a toast.
Expand Down

0 comments on commit 05b5869

Please sign in to comment.