Skip to content

Commit

Permalink
fix(lifecycle): beforeUpdated should not be called if component is de…
Browse files Browse the repository at this point in the history
…stroyed, fix vuejs#8076

fix references to beforeUpdate spy
  • Loading branch information
therealpecus committed Dec 10, 2018
1 parent 2b99bf7 commit 5eb4fd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/features/options/lifecycle.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ describe('Options lifecycle hooks', () => {

// #8076
it('should not be called after destroy', done => {
const beforeUpdated = jasmine.createSpy('beforeUpdated')
const beforeUpdate = jasmine.createSpy('beforeUpdate')
const destroyed = jasmine.createSpy('destroyed')

Vue.component('todo', {
template: '<div>{{todo.done}}</div>',
props: ['todo'],
destroyed,
beforeUpdated
beforeUpdate
})

const vm = new Vue({
Expand Down

0 comments on commit 5eb4fd6

Please sign in to comment.