diff --git a/src/util/cloneObject.ts b/src/util/cloneObject.ts index fcca27957..8fb3fdce7 100644 --- a/src/util/cloneObject.ts +++ b/src/util/cloneObject.ts @@ -11,7 +11,7 @@ export default function cloneObject(source: T): T { for (const key in source) { // @ts-ignore:next-line - if ("jQuery" in window && source[key] instanceof window.jQuery) { + if ("jQuery" in window && window.jQuery && source[key] instanceof window.jQuery) { temp[key] = source[key]; } else { temp[key] = cloneObject(source[key]);