diff --git a/src/server/utils/sandbox.ts b/src/server/utils/sandbox.ts index 611ddec..2f9ddf0 100644 --- a/src/server/utils/sandbox.ts +++ b/src/server/utils/sandbox.ts @@ -9,10 +9,12 @@ function isTransferable(data: any): data is ivm.Transferable { return true; } + if (data === null) { + return true; + } + if ( - ['null', 'undefined', 'string', 'number', 'boolean', 'function'].includes( - dataType - ) + ['undefined', 'string', 'number', 'boolean', 'function'].includes(dataType) ) { return true; }