Skip to content

Commit 2ee8d3c

Browse files
benjaminprojassp1ker
authored andcommitted
fix(clone): Make sure the 'then' property exists on the object before checking if its a function (vuejs#1105)
1 parent 145b1cb commit 2ee8d3c

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)