fix(reactivity): ensure computed always expose value
fix #3099 Also changes the original fix for #910 by moving the fix from reactivity to the scheduler
This commit is contained in:
@@ -193,4 +193,10 @@ describe('reactivity/computed', () => {
|
||||
expect(isReadonly(z)).toBe(false)
|
||||
expect(isReadonly(z.value.a)).toBe(false)
|
||||
})
|
||||
|
||||
it('should expose value when stopped', () => {
|
||||
const x = computed(() => 1)
|
||||
stop(x.effect)
|
||||
expect(x.value).toBe(1)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user