Skip to content

Commit 8dbf083

Browse files
committed
build: put ssrContext warning behind __DEV__ flag
1 parent f023d49 commit 8dbf083

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/runtime-core/src/helpers/useSsrContext.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ export const useSSRContext = <T = Record<string, any>>() => {
77
if (!__GLOBAL__) {
88
const ctx = inject<T>(ssrContextKey)
99
if (!ctx) {
10-
warn(
11-
`Server rendering context not provided. Make sure to only call ` +
12-
`useSSRContext() conditionally in the server build.`
13-
)
10+
__DEV__ &&
11+
warn(
12+
`Server rendering context not provided. Make sure to only call ` +
13+
`useSSRContext() conditionally in the server build.`
14+
)
1415
}
1516
return ctx
1617
} else if (__DEV__) {

0 commit comments

Comments
 (0)