chore: ensure warn is dev only

This commit is contained in:
Evan You 2020-05-04 10:17:40 -04:00
parent c6217b4d46
commit ff97be15c3

View File

@ -187,12 +187,13 @@ function doWatch(
} }
} else { } else {
getter = NOOP getter = NOOP
warn( __DEV__ &&
`Invalid watch source: `, warn(
source, `Invalid watch source: `,
`A watch source can only be a getter/effect function, a ref, ` + source,
`a reactive object, or an array of these types.` `A watch source can only be a getter/effect function, a ref, ` +
) `a reactive object, or an array of these types.`
)
} }
if (cb && deep) { if (cb && deep) {