@angular/core 5.2.5 → 5.2.6

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.
package/esm2015/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v5.2.5
2
+ * @license Angular v5.2.6
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -683,7 +683,7 @@ class Version {
683
683
  /**
684
684
  * \@stable
685
685
  */
686
- const VERSION = new Version('5.2.5');
686
+ const VERSION = new Version('5.2.6');
687
687
 
688
688
  /**
689
689
  * @fileoverview added by tsickle
@@ -1849,9 +1849,11 @@ function isType(v) {
1849
1849
  * found in the LICENSE file at https://angular.io/license
1850
1850
  */
1851
1851
  /**
1852
- * Attention: This regex has to hold even if the code is minified!
1852
+ * Attention: These regex has to hold even if the code is minified!
1853
1853
  */
1854
1854
  const DELEGATE_CTOR = /^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*arguments\)/;
1855
+ const INHERITED_CLASS = /^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{/;
1856
+ const INHERITED_CLASS_WITH_CTOR = /^class\s+[A-Za-z\d$_]*\s*extends\s+[A-Za-z\d$_]+\s*{[\s\S]*constructor\s*\(/;
1855
1857
  class ReflectionCapabilities {
1856
1858
  /**
1857
1859
  * @param {?=} reflect
@@ -1906,6 +1908,7 @@ class ReflectionCapabilities {
1906
1908
  * @return {?}
1907
1909
  */
1908
1910
  _ownParameters(type, parentCtor) {
1911
+ const /** @type {?} */ typeStr = type.toString();
1909
1912
  // If we have no decorators, we only have function.length as metadata.
1910
1913
  // In that case, to detect whether a child class declared an own constructor or not,
1911
1914
  // we need to look inside of that constructor to check whether it is
@@ -1913,7 +1916,8 @@ class ReflectionCapabilities {
1913
1916
  // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439
1914
1917
  // that sets 'design:paramtypes' to []
1915
1918
  // if a class inherits from another class but has no ctor declared itself.
1916
- if (DELEGATE_CTOR.exec(type.toString())) {
1919
+ if (DELEGATE_CTOR.exec(typeStr) ||
1920
+ (INHERITED_CLASS.exec(typeStr) && !INHERITED_CLASS_WITH_CTOR.exec(typeStr))) {
1917
1921
  return null;
1918
1922
  }
1919
1923
  // Prefer the direct API.
@@ -2145,7 +2149,7 @@ function convertTsickleDecoratorIntoMetadata(decoratorInvocations) {
2145
2149
  * @return {?}
2146
2150
  */
2147
2151
  function getParentCtor(ctor) {
2148
- const /** @type {?} */ parentProto = Object.getPrototypeOf(ctor.prototype);
2152
+ const /** @type {?} */ parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;
2149
2153
  const /** @type {?} */ parentCtor = parentProto ? parentProto.constructor : null;
2150
2154
  // Note: We always use `Object` as the null value
2151
2155
  // to simplify checking later on.