Clone objects types when getting env values

Fixes #4479
This commit is contained in:
Nick O'Leary
2024-01-08 20:56:17 +00:00
parent f0a9b0cf69
commit 3a6b1e86dc
4 changed files with 14 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ class Group {
}
if (!key.startsWith("$parent.")) {
if (this._env.hasOwnProperty(key)) {
return this._env[key]
return (Object.hasOwn(this._env[key], 'value') && this._env[key].__clone__) ? clone(this._env[key].value) : this._env[key]
}
} else {
key = key.substring(8);