Skip to content

Commit

Permalink
feat(checkAndReport): Check only the updated component
Browse files Browse the repository at this point in the history
  • Loading branch information
ktquez committed Jun 1, 2020
1 parent ba488b0 commit 672f261
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ export default function install (Vue, options) {

const checkWithDebounce = debounce(function () {
resetCache()
draf(() => checkAndReport(options))
draf(() => checkAndReport(options, this.$el))
}, 1000, { maxWait: 5000 })

// Rechecking when updating specific component
Vue.mixin({
updated () {
checkWithDebounce()
checkWithDebounce.call(this)
},
// Used for change of route
beforeDestroy () {
Expand Down

0 comments on commit 672f261

Please sign in to comment.