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

Bugfix for overriding settings #256

Closed

Conversation

florisschild
Copy link

Calling UpdateCfg would serialize all properties of the config object which would replace (set null) all the present values in the browser. Even when setting mergeExisting to true. By ignoring null values, existing settings would not be replaced with null when mergeExisting is true.

This fix makes it so you can use the configuration in index.html without overriding all the settings with null.

@IvanJosipovic
Copy link
Owner

Hey, thanks for this PR and identifying the issue.

This fix sends a JSON string to the app insights library instead of a object, this won't work.

I think the fix is to add the following annotation to all properties in Config and Configuration.

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]

@IvanJosipovic
Copy link
Owner

Closing in favor of #257

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.

None yet

2 participants