Skip to content

Commit

Permalink
chore: ensure warn is dev only
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed May 4, 2020
1 parent c6217b4 commit ff97be1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/runtime-core/src/apiWatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,13 @@ function doWatch(
}
} else {
getter = NOOP
warn(
`Invalid watch source: `,
source,
`A watch source can only be a getter/effect function, a ref, ` +
`a reactive object, or an array of these types.`
)
__DEV__ &&
warn(
`Invalid watch source: `,
source,
`A watch source can only be a getter/effect function, a ref, ` +
`a reactive object, or an array of these types.`
)
}

if (cb && deep) {
Expand Down

0 comments on commit ff97be1

Please sign in to comment.