@angular/core 9.1.11 → 9.1.12

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v9.1.11
2
+ * @license Angular v9.1.12
3
3
  * (c) 2010-2020 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -4242,18 +4242,28 @@
4242
4242
  */
4243
4243
  function ɵɵgetInheritedFactory(type) {
4244
4244
  return noSideEffects(function () {
4245
- var proto = Object.getPrototypeOf(type.prototype).constructor;
4246
- var factory = proto[NG_FACTORY_DEF] || ɵɵgetFactoryOf(proto);
4247
- if (factory !== null) {
4248
- return factory;
4249
- }
4250
- else {
4251
- // There is no factory defined. Either this was improper usage of inheritance
4252
- // (no Angular decorator on the superclass) or there is no constructor at all
4253
- // in the inheritance chain. Since the two cases cannot be distinguished, the
4254
- // latter has to be assumed.
4255
- return function (t) { return new t(); };
4256
- }
4245
+ var ownConstructor = type.prototype.constructor;
4246
+ var ownFactory = ownConstructor[NG_FACTORY_DEF] || ɵɵgetFactoryOf(ownConstructor);
4247
+ var objectPrototype = Object.prototype;
4248
+ var parent = Object.getPrototypeOf(type.prototype).constructor;
4249
+ // Go up the prototype until we hit `Object`.
4250
+ while (parent && parent !== objectPrototype) {
4251
+ var factory = parent[NG_FACTORY_DEF] || ɵɵgetFactoryOf(parent);
4252
+ // If we hit something that has a factory and the factory isn't the same as the type,
4253
+ // we've found the inherited factory. Note the check that the factory isn't the type's
4254
+ // own factory is redundant in most cases, but if the user has custom decorators on the
4255
+ // class, this lookup will start one level down in the prototype chain, causing us to
4256
+ // find the own factory first and potentially triggering an infinite loop downstream.
4257
+ if (factory && factory !== ownFactory) {
4258
+ return factory;
4259
+ }
4260
+ parent = Object.getPrototypeOf(parent);
4261
+ }
4262
+ // There is no factory defined. Either this was improper usage of inheritance
4263
+ // (no Angular decorator on the superclass) or there is no constructor at all
4264
+ // in the inheritance chain. Since the two cases cannot be distinguished, the
4265
+ // latter has to be assumed.
4266
+ return function (t) { return new t(); };
4257
4267
  });
4258
4268
  }
4259
4269
 
@@ -20219,7 +20229,7 @@
20219
20229
  /**
20220
20230
  * @publicApi
20221
20231
  */
20222
- var VERSION = new Version('9.1.11');
20232
+ var VERSION = new Version('9.1.12');
20223
20233
 
20224
20234
  /**
20225
20235
  * @license