mirror of https://github.com/vuejs/core.git
chore(apiWatch): constraint deep passes boolean (#9952)
This commit is contained in:
parent
10ccb9bfa0
commit
fe03b2f8bf
|
@ -189,6 +189,14 @@ function doWatch(
|
|||
}
|
||||
}
|
||||
|
||||
// TODO remove in 3.5
|
||||
if (__DEV__ && deep !== void 0 && typeof deep === 'number') {
|
||||
warn(
|
||||
`watch() "deep" option with number value will be used as watch depth in future versions. ` +
|
||||
`Please use a boolean instead to avoid potential breakage.`,
|
||||
)
|
||||
}
|
||||
|
||||
if (__DEV__ && !cb) {
|
||||
if (immediate !== undefined) {
|
||||
warn(
|
||||
|
|
Loading…
Reference in New Issue