fix: fix a bug which script not support makeTransferable json which data include null
for example: {a: null}
This commit is contained in:
parent
b0444e31e7
commit
824bd89ede
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user