Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit 5490955

Browse files
committed
fix(server): typecheck data when opening stash
1 parent d02cfbf commit 5490955

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ lib.callback.register('ox_inventory:openInventory', function(source, inv, data)
6161

6262
if data then
6363
if inv == 'stash' then
64-
local stash = Stashes[data.id or data] or Inventory.CustomStash[data.id or data]
64+
local invId = type(data) == 'table' and data.id or data
65+
local stash = Stashes[invId] or Inventory.CustomStash[invId]
6566

6667
if stash then
6768
if stash.jobs then stash.groups = stash.jobs end

0 commit comments

Comments
 (0)