diff --git a/packages/core/src/render3/jit/injectable.ts b/packages/core/src/render3/jit/injectable.ts index 0e77c9a3f5..64a218d3a0 100644 --- a/packages/core/src/render3/jit/injectable.ts +++ b/packages/core/src/render3/jit/injectable.ts @@ -27,6 +27,10 @@ export function compileInjectable(type: Type, srcMeta?: Injectable): void { const meta: Injectable = srcMeta || {providedIn: null}; let def: any = null; + + // if NG_INJECTABLE_DEF is already defined on this class then don't overwrite it + if (type.hasOwnProperty(NG_INJECTABLE_DEF)) return; + Object.defineProperty(type, NG_INJECTABLE_DEF, { get: () => { if (def === null) {