Skip to content

Commit

Permalink
proper default handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwitt committed Dec 27, 2023
1 parent 576cd12 commit 188de73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/qrlCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ export async function getMatchingQueues (prefix, nextToken) {
const command = new ListQueuesCommand(input)
const result = await client.send(command)
debug({ result })
const { QueueUrls: qrls, NextToken: keepGoing } = result
const { QueueUrls: qrls, NextToken: keepGoing } = result ?? {}
debug({ qrls, keepGoing })
if (keepGoing) (qrls || []).push(...await getMatchingQueues(prefix, keepGoing))
return qrls || []
if (keepGoing) (qrls ?? []).push(...await getMatchingQueues(prefix, keepGoing))
return qrls ?? []
}

//
Expand Down

0 comments on commit 188de73

Please sign in to comment.