Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nil Ref check and property decode warning to new Rojo protocol #466

Merged
merged 2 commits into from
Aug 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/src/Reconciler/decodeValue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local function decodeValue(encodedValue, instanceMap)

-- Refs are represented as IDs in the same space that Rojo's protocol uses.
if ty == "Ref" then
if value == nil then
if value == "00000000000000000000000000000000" then
return true, nil
end

Expand Down
4 changes: 3 additions & 1 deletion plugin/src/Reconciler/diff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ local function diff(instanceMap, virtualInstances, rootId)
changedProperties[propertyName] = virtualValue
end
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
else
local err = existingValueOrErr
Expand Down