Skip to content

Commit ff97be1

Browse files
committed
chore: ensure warn is dev only
1 parent c6217b4 commit ff97be1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

packages/runtime-core/src/apiWatch.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,13 @@ function doWatch(
187187
}
188188
} else {
189189
getter = NOOP
190-
warn(
191-
`Invalid watch source: `,
192-
source,
193-
`A watch source can only be a getter/effect function, a ref, ` +
194-
`a reactive object, or an array of these types.`
195-
)
190+
__DEV__ &&
191+
warn(
192+
`Invalid watch source: `,
193+
source,
194+
`A watch source can only be a getter/effect function, a ref, ` +
195+
`a reactive object, or an array of these types.`
196+
)
196197
}
197198

198199
if (cb && deep) {

0 commit comments

Comments
 (0)