@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
  */
package/fesm5/core.js CHANGED
@@ -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
  */
@@ -4057,18 +4057,28 @@ function ɵɵgetFactoryOf(type) {
4057
4057
  */
4058
4058
  function ɵɵgetInheritedFactory(type) {
4059
4059
  return noSideEffects(function () {
4060
- var proto = Object.getPrototypeOf(type.prototype).constructor;
4061
- var factory = proto[NG_FACTORY_DEF] || ɵɵgetFactoryOf(proto);
4062
- if (factory !== null) {
4063
- return factory;
4064
- }
4065
- else {
4066
- // There is no factory defined. Either this was improper usage of inheritance
4067
- // (no Angular decorator on the superclass) or there is no constructor at all
4068
- // in the inheritance chain. Since the two cases cannot be distinguished, the
4069
- // latter has to be assumed.
4070
- return function (t) { return new t(); };
4071
- }
4060
+ var ownConstructor = type.prototype.constructor;
4061
+ var ownFactory = ownConstructor[NG_FACTORY_DEF] || ɵɵgetFactoryOf(ownConstructor);
4062
+ var objectPrototype = Object.prototype;
4063
+ var parent = Object.getPrototypeOf(type.prototype).constructor;
4064
+ // Go up the prototype until we hit `Object`.
4065
+ while (parent && parent !== objectPrototype) {
4066
+ var factory = parent[NG_FACTORY_DEF] || ɵɵgetFactoryOf(parent);
4067
+ // If we hit something that has a factory and the factory isn't the same as the type,
4068
+ // we've found the inherited factory. Note the check that the factory isn't the type's
4069
+ // own factory is redundant in most cases, but if the user has custom decorators on the
4070
+ // class, this lookup will start one level down in the prototype chain, causing us to
4071
+ // find the own factory first and potentially triggering an infinite loop downstream.
4072
+ if (factory && factory !== ownFactory) {
4073
+ return factory;
4074
+ }
4075
+ parent = Object.getPrototypeOf(parent);
4076
+ }
4077
+ // There is no factory defined. Either this was improper usage of inheritance
4078
+ // (no Angular decorator on the superclass) or there is no constructor at all
4079
+ // in the inheritance chain. Since the two cases cannot be distinguished, the
4080
+ // latter has to be assumed.
4081
+ return function (t) { return new t(); };
4072
4082
  });
4073
4083
  }
4074
4084
 
@@ -20049,7 +20059,7 @@ var Version = /** @class */ (function () {
20049
20059
  /**
20050
20060
  * @publicApi
20051
20061
  */
20052
- var VERSION = new Version('9.1.11');
20062
+ var VERSION = new Version('9.1.12');
20053
20063
 
20054
20064
  /**
20055
20065
  * @license