@scrypted/server 0.121.3 → 0.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ class BufferTransfer {
|
|
17
17
|
// allow transfer of the buffer only if it sets the __rpc_transferable property.
|
18
18
|
// this is the only safe way to do this, since call sites may return the same buffer
|
19
19
|
// multiple times (like an image/jpeg MediaObject).
|
20
|
-
if (value.__rpc_transferable
|
20
|
+
if (value.__rpc_transferable !== true) {
|
21
21
|
const ab = value.buffer.slice(value.byteOffset, value.byteOffset + value.byteLength);
|
22
22
|
value = Buffer.from(ab);
|
23
23
|
}
|
package/package.json
CHANGED
@@ -16,7 +16,7 @@ class BufferTransfer implements RpcSerializer {
|
|
16
16
|
// allow transfer of the buffer only if it sets the __rpc_transferable property.
|
17
17
|
// this is the only safe way to do this, since call sites may return the same buffer
|
18
18
|
// multiple times (like an image/jpeg MediaObject).
|
19
|
-
if ((value as any).__rpc_transferable
|
19
|
+
if ((value as any).__rpc_transferable !== true) {
|
20
20
|
const ab = value.buffer.slice(value.byteOffset, value.byteOffset + value.byteLength);
|
21
21
|
value = Buffer.from(ab);
|
22
22
|
}
|