Scene save operations (in-place overwrite vs copy) (#126)

This commit is contained in:
Danny McGee
2024-04-09 15:39:32 -04:00
committed by GitHub
parent 5cd98b4a35
commit 03f90eee47
16 changed files with 418 additions and 105 deletions
+4 -1
View File
@@ -11,6 +11,9 @@ function isRef<T>(refOrValue: Ref<T> | T): refOrValue is Ref<T> {
if (!refOrValue || typeof refOrValue !== "object")
return false;
if (refOrValue instanceof Element)
return false;
const keys = Object.keys(refOrValue);
return keys.length === 1 && keys[0] === "value"
return keys.length === 0 || (keys.length === 1 && keys[0] === "value")
}