aboutsummaryrefslogtreecommitdiff
path: root/src/database.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.ts')
-rw-r--r--src/database.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/database.ts b/src/database.ts
index a8dd1a4..2b73c77 100644
--- a/src/database.ts
+++ b/src/database.ts
@@ -1113,7 +1113,8 @@ export async function updateItemAuction(auction: ItemAuctionsSchema) {
/**
* Fetches the SkyBlock ids of all the items in the auctions database. This method is slow and should be cached!
*/
-export async function fetchItemsAuctionsIds(): Promise<string[]> {
+export async function fetchItemsAuctionsIds(): Promise<string[] | undefined> {
+ if (!itemAuctionsCollection) return undefined
const docs = await itemAuctionsCollection?.aggregate([
// this removes everything except the _id
{ $project: { _id: true } }