Comparing version 0.5.1 to 0.5.2
@@ -0,1 +1,5 @@ | ||
# 0.5.2 | ||
* Fix `ValidationError` being able to use instanceof calls (gets around TypeScript 2.1+ issue) | ||
# 0.5.1 | ||
@@ -2,0 +6,0 @@ |
@@ -108,2 +108,5 @@ "use strict"; | ||
_this.errors = errors; | ||
// Required in order for error instances to be able to use instanceof. | ||
// SEE: https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md | ||
_this.__proto__ = ValidationError.prototype; | ||
return _this; | ||
@@ -110,0 +113,0 @@ } |
{ | ||
"name": "modelsafe", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "bugs": "https://github.com/creativecuriositystudio/modelsafe/issues", |
@@ -105,2 +105,6 @@ /** Contains the validation types. */ | ||
this.errors = errors; | ||
// Required in order for error instances to be able to use instanceof. | ||
// SEE: https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md | ||
(this as any).__proto__ = ValidationError.prototype; | ||
} | ||
@@ -107,0 +111,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1
162040
66
2588