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

fix(client): client not being initialized #78

Merged
merged 2 commits into from
May 7, 2019

Conversation

uniibu
Copy link
Contributor

@uniibu uniibu commented Apr 30, 2019

On the sentry.client.js

if (opts.initialize) {

will never be true since initialize is not a property of options.config as seen here
options: {
config: {
dsn: options.dsn,
...options.clientConfig
},
initialize: options.initialize,
integrations: filterDisabledIntegration(options.clientIntegrations).
reduce( (res, key) => (res[key] = options.clientIntegrations[key], res), {} )
}

So the simplest solution, without having to modify any other parts of the codes than the line itself is to convert the if condition to a serialized template and referencing options.initialize instead of opts.initialize

if (<%= serialize(options.initialize) %>) {
    Sentry.init(opts)
}

Signed-off-by: Uni Sayo unibtc@gmail.com

Signed-off-by: Uni Sayo <unibtc@gmail.com>
@aldarund
Copy link
Member

aldarund commented May 2, 2019

Ye, true, missed that when moved initialize.
How about making if in a lodash template instead of serialize? E.g.

<% if options.initialize %>
....

@pi0 pi0 changed the title Fix(client): Fixes client not being initialized fix(client): client not being initialized May 7, 2019
@pi0 pi0 merged commit a68f34b into nuxt-community:master May 7, 2019
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

3 participants