Skip to content

Commit 58f29c5

Browse files
committed
fix: do not invoke fns returned from math
1 parent 1db3782 commit 58f29c5

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/utils/Math.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ export function formatResult(body: unknown, scope: TemplateScope, options: Resul
3737
return (body as Date).toString();
3838
case 'Array':
3939
return (body as Array<unknown>).map((it) => formatResult(it, scope, options)).join(options.list.join);
40-
case 'Function':
41-
// TODO: make sure this doesn't allow math to escape the library sandbox
42-
return (body as Function).call(undefined, scope);
4340
case 'Object':
4441
return JSON.stringify(body);
4542
case 'RegExp':

0 commit comments

Comments
 (0)