Skip to content

Commit

Permalink
Fix deepClone for Node
Browse files Browse the repository at this point in the history
  • Loading branch information
Toby222 committed Jan 15, 2024
1 parent 692d8de commit 469e48c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,9 @@ SharkGame.MiscUtil = {
if (obj instanceof HTMLAllCollection) {
return obj;
}
if (obj instanceof Node) {
return obj.cloneNode(true);
}
switch (typeof obj) {
// Immutable types
case "bigint":
Expand Down

0 comments on commit 469e48c

Please sign in to comment.