Skip to content

Commit 462a829

Browse files
committed
Fixed format and typo
1 parent 8057c89 commit 462a829

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ludobits/m/deser.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,17 @@ M.quat = {
8282
end
8383
}
8484

85-
M.func = function(fn)
85+
function M.func(fn)
8686
assert(fn and type(fn) == "function", "You must provide a function")
8787
return {
8888
encode = function(v) return "" end,
8989
decode = function(v) return fn end,
9090
}
9191
end
9292

93-
M.gameobject = function(factory_url, properties)
93+
function M.gameobject(factory_url, properties)
9494
assert(factory_url, "You must provide a factory url")
95+
assert(properties)
9596
return {
9697
encode = function(id)
9798
assert(id and type(id) == "userdata", "Expected userdata")
@@ -151,7 +152,7 @@ function M.tableof(fn)
151152
end
152153

153154
function M.object(model)
154-
assert(model and type(mode) == "table", "Expected an object model")
155+
assert(model and type(model) == "table", "Expected an object model")
155156
return {
156157
encode = function(data)
157158
local result = {}
@@ -191,4 +192,4 @@ function M.json(model)
191192
end
192193

193194

194-
return M
195+
return M

0 commit comments

Comments
 (0)