File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
test/unit/specs/directives Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,10 @@ p.teardown = function () {
222222 // which can improve teardown performance.
223223 if ( ! this . vm . _isBeingDestroyed ) {
224224 var list = this . vm . _watcherList
225- list . splice ( list . indexOf ( this ) )
225+ var i = list . indexOf ( this )
226+ if ( i > - 1 ) {
227+ list . splice ( i , 1 )
228+ }
226229 }
227230 for ( var id in this . deps ) {
228231 this . deps [ id ] . removeSub ( this )
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ if (_.inBrowser) {
233233 expect ( opts [ 1 ] . selected ) . toBe ( false )
234234 // should teardown option watcher when unbind
235235 expect ( vm . _watcherList . length ) . toBe ( 2 )
236- vm . _directives [ 0 ] . unbind ( )
236+ vm . _directives [ 0 ] . _teardown ( )
237237 expect ( vm . _watcherList . length ) . toBe ( 0 )
238238 done ( )
239239 } )
You can’t perform that action at this time.
0 commit comments