mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 12:45:05 +00:00
Update nil Ref check and property decode warning to new Rojo protocol (#466)
* Skip empty Refs in new Rojo protocol * Update warning message for new Rojo protocol
This commit is contained in:
@@ -11,7 +11,7 @@ local function decodeValue(encodedValue, instanceMap)
|
|||||||
|
|
||||||
-- Refs are represented as IDs in the same space that Rojo's protocol uses.
|
-- Refs are represented as IDs in the same space that Rojo's protocol uses.
|
||||||
if ty == "Ref" then
|
if ty == "Ref" then
|
||||||
if value == nil then
|
if value == "00000000000000000000000000000000" then
|
||||||
return true, nil
|
return true, nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,9 @@ local function diff(instanceMap, virtualInstances, rootId)
|
|||||||
changedProperties[propertyName] = virtualValue
|
changedProperties[propertyName] = virtualValue
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Log.warn("Failed to decode property of type {}", virtualValue.Type)
|
-- virtualValue can be empty in certain cases, and this may print out nil to the user.
|
||||||
|
local propertyType = next(virtualValue)
|
||||||
|
Log.warn("Failed to decode property of type {}", propertyType)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local err = existingValueOrErr
|
local err = existingValueOrErr
|
||||||
|
|||||||
Reference in New Issue
Block a user