@@ -215,13 +215,13 @@ export function baseWatch(
const _cb = cb
cb = (...args) => {
_cb(...args)
- effect?.stop()
+ effect.stop()
}
} else {
const _getter = getter
getter = () => {
_getter()
@@ -842,7 +842,9 @@ export function createWatcher(
const options: WatchOptions = {}
if (__COMPAT__) {
const instance =
- getCurrentScope() === currentInstance?.scope ? currentInstance : null
+ currentInstance && getCurrentScope() === currentInstance.scope
+ ? currentInstance
+ : null
const newValue = getter()
if (