3.0.0-alpha.4
https://codepen.io/jkarczm/pen/ZEYgEXd?editors=0011
watch(() => null, () => console.log('null watched'))
watch(() => undefined, () => console.log('undefined watched'))
null watched and undefined watched in console
only null watched in console
Seems to be caused by setting oldValue before first run to undefined, then checking against the result of the getter which is also undefined so no runs will take place until the value is changed.
Most helpful comment
https://github.com/vuejs/vue-next/blob/74cb207c2296c9865ba42e1539077f4bb68929f0/packages/runtime-core/src/apiWatch.ts#L156-L164
Seems to be caused by setting oldValue before first run to undefined, then checking against the result of the getter which is also undefined so no runs will take place until the value is changed.