mirror of
https://github.com/lazuscripts/locator.git
synced 2024-11-19 10:54:24 +00:00
corrected call metamethod
This commit is contained in:
parent
98598d4ad0
commit
d25c34b2e1
10
init.moon
10
init.moon
@ -107,11 +107,11 @@ registry = setmetatable {}, {
|
|||||||
return setmetatable {
|
return setmetatable {
|
||||||
:locate, :autoload, :make_migrations, :registry
|
:locate, :autoload, :make_migrations, :registry
|
||||||
}, {
|
}, {
|
||||||
__call: (t, here="") ->
|
__call: (t, here) ->
|
||||||
if "init" == here\sub -4
|
if here and here\find "%."
|
||||||
here = here\sub 1, -6
|
here = here\sub 1, here\len! - here\match(".*%.(.+)")\len! - 1
|
||||||
unless here\len! > 0
|
else
|
||||||
here = ""
|
here = nil
|
||||||
return autoload here
|
return autoload here
|
||||||
|
|
||||||
__index: (t, name) ->
|
__index: (t, name) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user