diff --git a/modules/platform-node/node-platform.ts b/modules/platform-node/node-platform.ts index f94d60f70..cb598c035 100644 --- a/modules/platform-node/node-platform.ts +++ b/modules/platform-node/node-platform.ts @@ -118,7 +118,7 @@ function s4() { /*implements PlatformRef*/ export class NodePlatform { static _noop = () => {}; - static _cache = new Map(); + static _cache = new WeakMap(); get platformRef() { return this._platformRef; } @@ -332,7 +332,7 @@ export class NodePlatform { let prebootCode = null; // TODO(gdi2290): hide cache in (ngPreboot|UniversalPreboot) let prebootConfig = null; - let key = (typeof preboot === 'object') && JSON.stringify(preboot) || null; + let key = (typeof preboot === 'object') && preboot || null; let prebootEl = null; let el = null; let lastRef = null;