Fix check for missing metadata in PlayArea onObjectPickup

This commit is contained in:
Buhallin 2023-01-16 02:12:23 -08:00
parent 6990c8a628
commit 2e5484d97b
No known key found for this signature in database
GPG Key ID: DB3C362823852294

View File

@ -140,7 +140,7 @@ function onObjectPickUp(player, object)
-- should be tracking
if showLocationLinks() and isInPlayArea(object) and object.getGMNotes() ~= nil and object.getGMNotes() ~= "" then
local pickedUpGuid = object.getGUID()
local metadata = JSON.decode(object.getGMNotes())
local metadata = JSON.decode(object.getGMNotes()) or { }
if (metadata.type == "Location") then
-- onCollisionExit sometimes comes 1 frame after onObjectPickUp (rather than before it or in
-- the same frame). This causes a mismatch in the data between dragging the on-table, and