})
})
-test.todo('should be able to trigger with triggerRef', () => {
+test('should be able to trigger with triggerRef', () => {
const r = shallowRef({ a: 1 })
const ror = readonly(r)
let dummy
* @see {@link https://vuejs.org/api/reactivity-advanced.html#triggerref}
*/
export function triggerRef(ref: Ref): void {
- // ref may be an instance of ObjectRefImpl
- const dep = (ref as unknown as RefImpl).dep
+ const rawRef = isProxy(ref) ? toRaw(ref) : ref
+ const dep = (rawRef as unknown as RefImpl).dep
if (dep !== undefined && dep.subs !== undefined) {
propagate(dep.subs)
}