Skip to content

Commit 1453b3f

Browse files
committed
don't run __depCtrlInit functions in modules that already have a loaded DependencyControl record
1 parent 3f173ed commit 1453b3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/DependencyControl.moon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ class DependencyControl
345345
._ref, LOADED_MODULES[moduleName] = res, res
346346

347347
-- run initialization function if one was specified
348-
if "table" == type(res) and "function" == type res.__depCtrlInit
348+
if "table" == type(res) and "function" == type res.__depCtrlInit and (type(res.version) != "table" or res.version.__name != @@__name)
349349
res.__depCtrlInit @@
350350

351351
return mdl._ref -- having this in the with block breaks moonscript

0 commit comments

Comments
 (0)