Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Main] Add support to tag objects to force or block dynamic conversion #2020

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

MSNev
Copy link
Collaborator

@MSNev MSNev commented Mar 17, 2023

No description provided.

@@ -62,7 +62,7 @@ function _createDynamicHandler<T extends IConfiguration>(logger: IDiagnosticLogg
}

function _setValue<C, V>(target: C, name: string, value: V) {
return _setDynamicProperty(theState, target, name, value);
return _setDynamicProperty(theState, target, name, value)[name];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the _setDynamicProperty() to return then target rather than the target[name] as that was indirectly causing the objects to be referenced and converted to be dynamic (if they where not already).

This caused an issue when "setting" the default values (which didn't use the returned value) and also indirectly caused everything to become dynamic during initialization whether referenced or not.

@MSNev MSNev changed the title Add support to tag objects to force or block dynamic conversion [Main] Add support to tag objects to force or block dynamic conversion Mar 17, 2023
@MSNev MSNev merged commit 034e895 into main Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants