@@ -134,7 +134,6 @@ export class DomRendererFactory2 implements RendererFactory2, OnDestroy {
134134 EmulatedEncapsulationDomRenderer2 | NoneEncapsulationDomRenderer
135135 > ( ) ;
136136 private readonly defaultRenderer : Renderer2 ;
137- private readonly platformIsServer : boolean ;
138137
139138 constructor (
140139 private readonly eventManager : EventManager ,
@@ -148,14 +147,7 @@ export class DomRendererFactory2 implements RendererFactory2, OnDestroy {
148147 @Optional ( )
149148 private readonly tracingService : TracingService < TracingSnapshot > | null = null ,
150149 ) {
151- this . platformIsServer = typeof ngServerMode !== 'undefined' && ngServerMode ;
152- this . defaultRenderer = new DefaultDomRenderer2 (
153- eventManager ,
154- doc ,
155- ngZone ,
156- this . platformIsServer ,
157- this . tracingService ,
158- ) ;
150+ this . defaultRenderer = new DefaultDomRenderer2 ( eventManager , doc , ngZone , this . tracingService ) ;
159151 }
160152
161153 createRenderer ( element : any , type : RendererType2 | null ) : Renderer2 {
@@ -195,7 +187,6 @@ export class DomRendererFactory2 implements RendererFactory2, OnDestroy {
195187 const eventManager = this . eventManager ;
196188 const sharedStylesHost = this . sharedStylesHost ;
197189 const removeStylesOnCompDestroy = this . removeStylesOnCompDestroy ;
198- const platformIsServer = this . platformIsServer ;
199190 const tracingService = this . tracingService ;
200191
201192 switch ( type . encapsulation ) {
@@ -208,7 +199,6 @@ export class DomRendererFactory2 implements RendererFactory2, OnDestroy {
208199 removeStylesOnCompDestroy ,
209200 doc ,
210201 ngZone ,
211- platformIsServer ,
212202 tracingService ,
213203 ) ;
214204 break ;
@@ -220,7 +210,6 @@ export class DomRendererFactory2 implements RendererFactory2, OnDestroy {
220210 doc ,
221211 ngZone ,
222212 this . nonce ,
223- platformIsServer ,
224213 tracingService ,
225214 sharedStylesHost ,
226215 ) ;
@@ -232,7 +221,6 @@ export class DomRendererFactory2 implements RendererFactory2, OnDestroy {
232221 doc ,
233222 ngZone ,
234223 this . nonce ,
235- platformIsServer ,
236224 tracingService ,
237225 ) ;
238226
@@ -244,7 +232,6 @@ export class DomRendererFactory2 implements RendererFactory2, OnDestroy {
244232 removeStylesOnCompDestroy ,
245233 doc ,
246234 ngZone ,
247- platformIsServer ,
248235 tracingService ,
249236 ) ;
250237 break ;
@@ -282,7 +269,6 @@ class DefaultDomRenderer2 implements Renderer2 {
282269 private readonly eventManager : EventManager ,
283270 private readonly doc : Document ,
284271 protected readonly ngZone : NgZone ,
285- private readonly platformIsServer : boolean ,
286272 private readonly tracingService : TracingService < TracingSnapshot > | null ,
287273 ) { }
288274
@@ -514,11 +500,10 @@ class ShadowDomRenderer extends DefaultDomRenderer2 {
514500 doc : Document ,
515501 ngZone : NgZone ,
516502 nonce : string | null ,
517- platformIsServer : boolean ,
518503 tracingService : TracingService < TracingSnapshot > | null ,
519504 private sharedStylesHost ?: SharedStylesHost ,
520505 ) {
521- super ( eventManager , doc , ngZone , platformIsServer , tracingService ) ;
506+ super ( eventManager , doc , ngZone , tracingService ) ;
522507 this . shadowRoot = ( hostEl as any ) . attachShadow ( { mode : 'open' } ) ;
523508
524509 // SharedStylesHost is used to add styles to the shadow root by ShadowDom.
@@ -602,11 +587,10 @@ class NoneEncapsulationDomRenderer extends DefaultDomRenderer2 {
602587 private removeStylesOnCompDestroy : boolean ,
603588 doc : Document ,
604589 ngZone : NgZone ,
605- platformIsServer : boolean ,
606590 tracingService : TracingService < TracingSnapshot > | null ,
607591 compId ?: string ,
608592 ) {
609- super ( eventManager , doc , ngZone , platformIsServer , tracingService ) ;
593+ super ( eventManager , doc , ngZone , tracingService ) ;
610594 let styles = component . styles ;
611595 if ( ngDevMode ) {
612596 // We only do this in development, as for production users should not add CSS sourcemaps to components.
@@ -644,7 +628,6 @@ class EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {
644628 removeStylesOnCompDestroy : boolean ,
645629 doc : Document ,
646630 ngZone : NgZone ,
647- platformIsServer : boolean ,
648631 tracingService : TracingService < TracingSnapshot > | null ,
649632 ) {
650633 const compId = appId + '-' + component . id ;
@@ -655,7 +638,6 @@ class EmulatedEncapsulationDomRenderer2 extends NoneEncapsulationDomRenderer {
655638 removeStylesOnCompDestroy ,
656639 doc ,
657640 ngZone ,
658- platformIsServer ,
659641 tracingService ,
660642 compId ,
661643 ) ;
0 commit comments