Update to latest rbx-dom 2.0 dependencies, including Lua

This commit is contained in:
Lucien Greathouse
2021-07-02 16:04:43 -04:00
parent 26a08f4d9f
commit 2377f41036
5 changed files with 4019 additions and 6018 deletions

View File

@@ -431,12 +431,14 @@ types = {
local EncodedValue = {}
function EncodedValue.decode(encodedValue)
local typeImpl = types[encodedValue.Type]
local ty, value = next(encodedValue)
local typeImpl = types[ty]
if typeImpl == nil then
return false, "Couldn't decode value " .. tostring(encodedValue.Type)
return false, "Couldn't decode value " .. tostring(ty)
end
return true, typeImpl.fromPod(encodedValue.Value)
return true, typeImpl.fromPod(value)
end
function EncodedValue.encode(rbxValue, propertyType)
@@ -448,8 +450,7 @@ function EncodedValue.encode(rbxValue, propertyType)
end
return true, {
Type = propertyType,
Value = typeImpl.toPod(rbxValue),
[propertyType] = typeImpl.toPod(rbxValue),
}
end