From 4112c3337b85733e940123532a6b96a5f43a7a32 Mon Sep 17 00:00:00 2001 From: Kris Selden Date: Tue, 2 Nov 2021 17:57:57 -0700 Subject: [PATCH] Fix memory leak --- packages/@ember/-internals/container/lib/container.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@ember/-internals/container/lib/container.ts b/packages/@ember/-internals/container/lib/container.ts index d811fd971c1..f9e9e2a947e 100644 --- a/packages/@ember/-internals/container/lib/container.ts +++ b/packages/@ember/-internals/container/lib/container.ts @@ -485,7 +485,7 @@ class FactoryManager { this.injections = undefined; setFactoryFor(this, this); - if (factory) { + if (isInstantiatable(container, fullName)) { setFactoryFor(factory, this); } }