diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-02-26 17:36:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-26 17:36:05 -0500 |
commit | b8a537d020f5e4495572daa4d8a59f51fa3b20d1 (patch) | |
tree | 468164b8dcc8ce0bcd64e75b63e4a3af0da36f15 /js/dispatch.ts | |
parent | 5dfbbbb07a8f484dca27bbe0d7a3bafb0bdb91fd (diff) |
deno_core (#1827)
A new low-level crate with focus on speed.
This doesn't yet hook into the existing code base.
Diffstat (limited to 'js/dispatch.ts')
-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(); |