Skip to content

Commit 5eb4fd6

Browse files
committed
fix(lifecycle): beforeUpdated should not be called if component is destroyed, fix vuejs#8076
fix references to beforeUpdate spy
1 parent 2b99bf7 commit 5eb4fd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/unit/features/options/lifecycle.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,14 @@ describe('Options lifecycle hooks', () => {
155155

156156
// #8076
157157
it('should not be called after destroy', done => {
158-
const beforeUpdated = jasmine.createSpy('beforeUpdated')
158+
const beforeUpdate = jasmine.createSpy('beforeUpdate')
159159
const destroyed = jasmine.createSpy('destroyed')
160160

161161
Vue.component('todo', {
162162
template: '<div>{{todo.done}}</div>',
163163
props: ['todo'],
164164
destroyed,
165-
beforeUpdated
165+
beforeUpdate
166166
})
167167

168168
const vm = new Vue({

0 commit comments

Comments
 (0)