Skip to content

Commit

Permalink
Optional chain queue find
Browse files Browse the repository at this point in the history
  • Loading branch information
theoilie authored and felixmosh committed Jul 14, 2022
1 parent fbace4b commit b68cd36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ export const App = ({ api }: { api: Api }) => {
path="/queue/:name"
render={({ match: { params } }) => {
const currentQueueName = decodeURIComponent(params.name);
const queue = state.data?.queues.find((q) => q.name === currentQueueName);
const queue = state.data?.queues?.find((q) => q.name === currentQueueName);

return (
<QueuePage
queue={queue}
queue={queue || undefined}
actions={actions}
selectedStatus={selectedStatuses}
/>
Expand Down

0 comments on commit b68cd36

Please sign in to comment.