From b8a537d020f5e4495572daa4d8a59f51fa3b20d1 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 26 Feb 2019 17:36:05 -0500 Subject: deno_core (#1827) A new low-level crate with focus on speed. This doesn't yet hook into the existing code base. --- js/dispatch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') 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(); -- cgit v1.2.3