From 4dfd84c48755ab2560ff2b6d324eb2fdaf4532ee Mon Sep 17 00:00:00 2001 From: Benjamin Rojas Date: Mon, 11 Nov 2019 08:32:58 -0500 Subject: [PATCH] Make sure the 'then' property exists on the object before checking if its a function --- packages/app-backend/src/clone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-backend/src/clone.js b/packages/app-backend/src/clone.js index 6e35a4434..9da8e3941 100644 --- a/packages/app-backend/src/clone.js +++ b/packages/app-backend/src/clone.js @@ -376,7 +376,7 @@ function clone (object, options) { // if the object cannot / should not be cloned, don't if ( // promise-like - typeof object.then === 'function' || + (hasOwnProperty.call(object, 'then') && typeof object.then === 'function') || // errors object instanceof Error || // weakmaps