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(docs): typo in the lazy-loading section #363

Merged
merged 1 commit into from Nov 1, 2021

Conversation

raminjafary
Copy link
Contributor

I suppose errorListener should be called on this in the following example:

  mounted() {
    // This will only load sentry once an error was thrown
    // To prevent a chicken & egg issue, make sure to also
    // set injectMock: true if you use this so the error
    // that triggered the load will also be captured
    this.errorListener = () => {
      this.$sentryLoad()
      window.removeEventListener('error', errorListener)
    }
    window.addEventListener('error', errorListener)
  },
  destroyed() {
    window.removeEventListener('error', this.errorListener)
  }

I suppose `errorListener` should be called on `this` in the following example:

```js
  mounted() {
    // This will only load sentry once an error was thrown
    // To prevent a chicken & egg issue, make sure to also
    // set injectMock: true if you use this so the error
    // that triggered the load will also be captured
    this.errorListener = () => {
      this.$sentryLoad()
      window.removeEventListener('error', errorListener)
    }
    window.addEventListener('error', errorListener)
  },
  destroyed() {
    window.removeEventListener('error', this.errorListener)
  }
```
@codecov
Copy link

codecov bot commented Nov 1, 2021

Codecov Report

Merging #363 (e9890ed) into master (0aeba6e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #363   +/-   ##
=======================================
  Coverage   74.46%   74.46%           
=======================================
  Files           1        1           
  Lines          47       47           
  Branches       21       21           
=======================================
  Hits           35       35           
  Misses          9        9           
  Partials        3        3           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0aeba6e...e9890ed. Read the comment docs.

@rchl
Copy link
Member

rchl commented Nov 1, 2021

Thanks.

@rchl rchl merged commit dfcc0ab into nuxt-community:master Nov 1, 2021
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