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(MetricsInstrumentation): check document.scripts not null #3707

Closed
wants to merge 1 commit into from

Conversation

janpoem
Copy link

@janpoem janpoem commented Jun 18, 2021

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

fix #3705

@janpoem janpoem requested a review from kamilogorek as a code owner June 18, 2021 09:58
@AbhiPrasad AbhiPrasad self-requested a review June 18, 2021 11:03
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution. You can fix the lint error by adding a eslint disable ahead of the addPerformanceEntries function.

// eslint-disable-next-line complexity
public addPerformanceEntries(transaction: Transaction): void {

AbhiPrasad added a commit that referenced this pull request Jun 29, 2021
Fixes #3705

Supersedes #3707

We should check if document.scripts exists as it does not exist in some
browser environments. This patch also refectors the document logic
to rely on `global.document` instead of `document`.
AbhiPrasad added a commit that referenced this pull request Jun 29, 2021
Fixes #3705

Supersedes #3707

We should check if document.scripts exists as it does not exist in some
browser environments. This patch also refactors the document logic
to rely on `global.document` instead of `document`.
@AbhiPrasad
Copy link
Member

Closing this PR in favour of #3766. Thank you for your contribution!

@AbhiPrasad AbhiPrasad closed this Jun 29, 2021
AbhiPrasad added a commit that referenced this pull request Jun 30, 2021
Fixes #3705

Supersedes #3707

We should check if document.scripts exists as it does not exist in some
browser environments. This patch also refactors the document logic
to rely on `global.document` instead of `document`.
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.

There are not 'document.scripts' in mini-program environment
2 participants