Skip to content

Commit

Permalink
Merge pull request #2029 from atoff/master
Browse files Browse the repository at this point in the history
fix: `cloneObject` when `window.jQuery` set but null/undefined
  • Loading branch information
binrysearch authored Apr 30, 2024
2 parents e22a2dd + 0065f24 commit cda22fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/cloneObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function cloneObject<T>(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]);
Expand Down

0 comments on commit cda22fc

Please sign in to comment.