core: export HomeHandler

This commit is contained in:
undefined committed 2022-03-10 22:18:28 +08:00
1 parent 8bb072a5a4
commit b13bf24031
5 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -20,8 +20,8 @@ function parseParameters(fn: Function) {
.replace(COMMENTS, '')
.replace(ARR, '');
const result = code.slice(code.indexOf('(') + 1, code.indexOf(')'))
.match(/([^,]+)/g).map((i) => i.trim());
return result === null ? [] : result;
.match(/([^,]+)/g)?.map((i) => i.trim());
return result ?? [];
}
async function runScript(name: string, arg: any) {