From 1762f1637dbdf2f9d6613cf05b2b9348b2cfee35 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 14 Jul 2024 19:48:52 +0100 Subject: [PATCH] Added exit when flea offer type is not found (cherry picked from commit c2ccadf110829904bcd555c8ec22fb6b438b46cf) --- project/src/controllers/RagfairController.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/project/src/controllers/RagfairController.ts b/project/src/controllers/RagfairController.ts index f85423c2..6c72c120 100644 --- a/project/src/controllers/RagfairController.ts +++ b/project/src/controllers/RagfairController.ts @@ -424,6 +424,10 @@ export class RagfairController } const typeOfOffer = this.getOfferType(offerRequest); + if (typeOfOffer === FleaOfferType.UNKNOWN) + { + return this.httpResponse.appendErrorToOutput(output, "Unknown offer type, cannot list item on flea"); + } // Find items to be listed on flea from player inventory const { items: itemsInInventoryToList, errorMessage: itemsInInventoryError }