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

Initialize config before set profileQueryEndpoint #601

Merged
merged 2 commits into from Mar 17, 2020

Conversation

qetza
Copy link
Contributor

@qetza qetza commented Mar 9, 2020

The set on profileQueryEndpoint is using this current Config instance which is not fully configured. This fixes it by moving the set after all properties are initialized.

@markwolff markwolff self-requested a review March 11, 2020 18:02
@markwolff
Copy link
Contributor

Was this causing issues for you? Which field is not configured here?

@qetza
Copy link
Contributor Author

qetza commented Mar 12, 2020

When setting profileQueryEndpoint it will internally call CorrelationIdManager.queryCorrelationId passing the current instance of Config (where the proxy properties are not set yet) which will queue a call to fetchAppId which uses those properties to make an HTTP call.
Due to the nature of javascript the fetchAppId should not be dequeued before the Config instance is fully initialized but just in case (and for people like me note familiar at start with javascript "threading" model) i think it's better when reading the code have a fully set object passed to external objects.

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