We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e93ccfd commit a6844bdCopy full SHA for a6844bd
Libraries/Utilities/defineLazyObjectProperty.js
@@ -35,6 +35,12 @@ function defineLazyObjectProperty<T>(
35
// `setValue` which calls `Object.defineProperty` which somehow triggers
36
// `getValue` again. Adding `valueSet` breaks this loop.
37
if (!valueSet) {
38
+ // Calling `get()` here can trigger an infinite loop if it fails to
39
+ // remove the getter on the property, which can happen when executing
40
+ // JS in a V8 context. `valueSet = true` will break this loop, and
41
+ // sets the value of the property to undefined, until the code in `get()`
42
+ // finishes, at which point the property is set to the correct value.
43
+ valueSet = true;
44
setValue(get());
45
}
46
return value;
0 commit comments