mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-01 13:45:04 +00:00
fix(client/interface): cache input promise
Caching the promise into a variable allows us to set input to nil and resolve the promise after, which fixes an issue with opening 2 input dialogs back to back
This commit is contained in:
1 parent
0e7bd1a177
commit
82d052a1bb
1 file changed
+2
-2
@@ -26,8 +26,8 @@ end
|
||||
|
||||
RegisterNUICallback('inputData', function(data, cb)
|
||||
cb(1)
|
||||
if not input then return end
|
||||
SetNuiFocus(false, false)
|
||||
if not data then input:resolve() else input:resolve(data) end
|
||||
local promise = input
|
||||
input = nil
|
||||
promise:resolve(data)
|
||||
end)
|
||||
Reference in new issue
Block a user