Skip to content

Commit f6f4fa7

Browse files
benjaminprojasAkryum
authored andcommitted
fix(clone): Make sure the 'then' property exists on the object before checking if its a function (#1105)
1 parent c4f5c94 commit f6f4fa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/app-backend/src/clone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ function clone (object, options) {
376376
// if the object cannot / should not be cloned, don't
377377
if (
378378
// promise-like
379-
typeof object.then === 'function' ||
379+
(hasOwnProperty.call(object, 'then') && typeof object.then === 'function') ||
380380
// errors
381381
object instanceof Error ||
382382
// weakmaps

0 commit comments

Comments
 (0)