File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
packages/@lwc/ssr-runtime/src Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,10 @@ class ContextBinding<C extends LightningElement> implements IContextBinding<Ligh
3030 ) : void {
3131 const contextVarieties = this . component [ SYMBOL__CONTEXT_VARIETIES ] ;
3232 if ( contextVarieties . has ( contextVariety ) ) {
33- throw new Error ( 'Multiple contexts of the same variety were provided.' ) ;
33+ if ( process . env . NODE_ENV !== 'production' ) {
34+ throw new Error ( 'Multiple contexts of the same variety were provided.' ) ;
35+ }
36+ return ;
3437 }
3538 contextVarieties . set ( contextVariety , providedContextSignal ) ;
3639 }
@@ -74,10 +77,12 @@ export function connectContext(le: LightningElement) {
7477 ( le as any ) [ contextfulKeys [ i ] ] [ connectContext ] ( new ContextBinding ( le ) ) ;
7578 }
7679 } catch ( err : any ) {
77- throw new Error (
78- `Attempted to connect to trusted context but received the following error: ${
79- err . message
80- } `
81- ) ;
80+ if ( process . env . NODE_ENV !== 'production' ) {
81+ throw new Error (
82+ `Attempted to connect to trusted context but received the following error: ${
83+ err . message
84+ } `
85+ ) ;
86+ }
8287 }
8388}
You can’t perform that action at this time.
0 commit comments