From: Evan You Date: Mon, 4 May 2020 14:17:40 +0000 (-0400) Subject: chore: ensure warn is dev only X-Git-Tag: v3.0.0-beta.8~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff97be15c371a11dd3f9b346933ba3729d4aa16b;p=thirdparty%2Fvuejs%2Fcore.git chore: ensure warn is dev only --- diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index 322e38e6cf..4fcc0a850b 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -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) {