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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data === null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
['null', 'undefined', 'string', 'number', 'boolean', 'function'].includes(
|
['undefined', 'string', 'number', 'boolean', 'function'].includes(dataType)
|
||||||
dataType
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user