diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/dispatch.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/dispatch.ts b/js/dispatch.ts index e52a6f64c..55ea682fc 100644 --- a/js/dispatch.ts +++ b/js/dispatch.ts @@ -17,7 +17,7 @@ export function setFireTimersCallback(fn: () => void) { export function handleAsyncMsgFromRust(ui8: Uint8Array) { // If a the buffer is empty, recv() on the native side timed out and we // did not receive a message. - if (ui8.length) { + if (ui8 && ui8.length) { const bb = new flatbuffers.ByteBuffer(ui8); const base = msg.Base.getRootAsBase(bb); const cmdId = base.cmdId(); |