From 0fb74a74ef82f677ba8b45a3222c32ca43eb969e Mon Sep 17 00:00:00 2001 From: Selt <83926739+seltonmt012@users.noreply.github.com> Date: Mon, 27 Jul 2026 20:12:50 +0200 Subject: [PATCH] fix(esx_inventory): let the quantity dialog accept a corrected amount The quantity dialog resolved its promise with nil on an invalid amount, so the give/remove had already aborted by the time the player typed a valid value. The dialog stayed open and a corrected amount did nothing. Dropping the early resolve leaves the promise pending, so the same open dialog accepts the retry and drops/gives the item. Cancel still resolves nil. Tested on artifact 25770: entered an over-count amount, got "invalid amount", corrected to a valid amount. Before, nothing happened; after, the item was dropped. --- [core]/esx_inventory/client/main.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/[core]/esx_inventory/client/main.lua b/[core]/esx_inventory/client/main.lua index 3fd84785..c5cf65ff 100644 --- a/[core]/esx_inventory/client/main.lua +++ b/[core]/esx_inventory/client/main.lua @@ -146,7 +146,6 @@ local function openQuantityDialog(title, maxCount) local qty = tonumber(data.value) if not qty or qty <= 0 or qty > maxCount then ESX.ShowNotification(TranslateCap("amount_invalid")) - p:resolve(nil) else menu.close() p:resolve(qty)