Skip to content

Commit

Permalink
Add support for comparing property of type selector, this fixes the e…
Browse files Browse the repository at this point in the history
…rror 'RangeError: Maximum call stack size exceeded' when using copy entity HTML to clipboard with a component having a selector property like movement-controls's camera property (#782)
  • Loading branch information
vincentfretin authored Nov 27, 2024
1 parent 6dd22fb commit 84cb492
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export function equal(var1, var2) {
if (type1 !== 'object' || var1 === null || var2 === null) {
return var1 === var2;
}
if (var1 instanceof HTMLElement || var2 instanceof HTMLElement) {
// If we're here, we're comparing a value of a schema property of type selector like movement-controls's camera property
return var1 === var2;
}
keys1 = Object.keys(var1);
keys2 = Object.keys(var2);
if (keys1.length !== keys2.length) {
Expand Down

0 comments on commit 84cb492

Please sign in to comment.