@tstdl/base 0.93.16 → 0.93.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -320,8 +320,10 @@ export class Injector {
320
320
  }
321
321
  _resolveRegistration(registration, argument, options, context, chain) {
322
322
  checkOverflow(chain, context);
323
- const { token, providers } = registration;
324
- const injector = this.fork('ResolutionInjector');
323
+ const { token, provider, providers } = registration;
324
+ // A new scope is only needed if we are instantiating a class, running a factory, or if the registration explicitly defines scoped providers.
325
+ const needsNewScope = isClassProvider(provider) || isFactoryProvider(provider) || (providers.length > 0);
326
+ const injector = needsNewScope ? this.fork('ResolutionInjector') : this;
325
327
  for (const nestedProvider of providers) {
326
328
  injector.registerSingleton(nestedProvider.provide, nestedProvider, { multi: nestedProvider.multi });
327
329
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.93.16",
3
+ "version": "0.93.17",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"