refactor: expose runner on computed

This commit is contained in:
Evan You
2018-09-20 18:36:34 -04:00
parent fa9b3df5ab
commit 9b50a5abb9
3 changed files with 10 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import { EMPTY_OBJ } from './utils'
import { computed, ComputedGetter } from '@vue/observer'
import { computed, stop, ComputedGetter } from '@vue/observer'
import { Component, ComponentClass } from './component'
import { ComponentComputedOptions } from './componentOptions'
@@ -59,7 +59,7 @@ export function teardownComputed(instance: Component) {
const handles = instance._computedGetters
if (handles !== null) {
for (const key in handles) {
handles[key].stop()
stop(handles[key].runner)
}
}
}