diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2018-11-01 09:45:33 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2018-11-01 09:45:33 +0000 |
| commit | b1ea3892278adee65111b5e07b612a72dce1b019 (patch) | |
| tree | 4b361d3ec658f921b265689d49cbd27356ea2545 /lib/init.server.moon | |
| parent | Merge branch 'root-mmmfs' (diff) | |
| download | mmm-b1ea3892278adee65111b5e07b612a72dce1b019.tar.gz mmm-b1ea3892278adee65111b5e07b612a72dce1b019.zip | |
defer all scripts
Diffstat (limited to 'lib/init.server.moon')
| -rw-r--r-- | lib/init.server.moon | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/init.server.moon b/lib/init.server.moon index 198c64e..cc3851d 100644 --- a/lib/init.server.moon +++ b/lib/init.server.moon @@ -46,7 +46,10 @@ on_client = (fn, ...) -> -- warn code "<script type=\"application/lua\"> local fn = #{compile fn} - fn(#{table.concat [string.format '%q', v for v in *args ], ', '}) + on_load = on_load or {} + table.insert(on_load, function() + fn(#{table.concat [string.format '%q', v for v in *args ], ', '}) + end) </script>" { |
