Fix reflection errors when explicitly “false”.#354
Merged
theengineear merged 1 commit intomainfrom Mar 11, 2026
Merged
Conversation
theengineear
commented
Mar 6, 2026
| hostInfo.reflecting = false; | ||
| }; | ||
| } else { | ||
| delete property.reflect; |
Collaborator
Author
There was a problem hiding this comment.
We explicitly delete now in the false case so that we can depend on this being either undefined or a Function in later code.
1f5cc2c to
c8c2eb0
Compare
Contributor
|
Thanks @theengineear — LG2M — much appreciated! |
While developers will typically just _omit_ the configuration for property reflection when anything other than “true” — it should still _work_ when explicitly set to “false”. The crux of the change is to `delete` the property entirely such that the truthy path ends up with a special _function_ and the falsey path ends up with `undefined` (which is our expectation). Previously, when we saw the internal value was indeed _defined_ — we expected to be able to call it as a function, which caused a failure. Closes #353.
c8c2eb0 to
53c26f5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While developers will typically just omit the configuration for property reflection when anything other than “true” — it should still work when explicitly set to “false”.
The crux of the change is to
deletethe property entirely such that the truthy path ends up with a special function and the falsey path ends up withundefined(which is our expectation). Previously, when we saw the internal value was indeed defined — we expected to be able to call it as a function, which caused a failure.Closes #353.