From 9b8a8647f004e6c62cd318dc27dcd9f7a9af5248 Mon Sep 17 00:00:00 2001 From: Corey Frang Date: Wed, 7 Mar 2018 18:13:15 -0500 Subject: [PATCH] ensure this.workerClass exists before instanceof check This avoids an error I was running into in a node environment: ``` TypeError: Right-hand side of 'instanceof' is not an object ``` --- src/dispatch/central-dispatch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dispatch/central-dispatch.js b/src/dispatch/central-dispatch.js index 6dd236255..a53e50d79 100644 --- a/src/dispatch/central-dispatch.js +++ b/src/dispatch/central-dispatch.js @@ -83,7 +83,7 @@ class CentralDispatch extends SharedDispatch { const provider = this.services[service]; return provider && { provider, - isRemote: provider instanceof this.workerClass + isRemote: Boolean(this.workerClass && provider instanceof this.workerClass) }; }