Comparing version 1.2.4 to 1.2.5
@@ -216,3 +216,3 @@ "use strict"; | ||
} | ||
if (this._config.onPreToJSONData) { | ||
if (typeof this._config.onPreToJSONData === 'function') { | ||
data = this._config.onPreToJSONData(data); | ||
@@ -226,3 +226,3 @@ } | ||
}); | ||
fieldsToOmit.forEach(item => { | ||
fieldsToOmit === null || fieldsToOmit === void 0 ? void 0 : fieldsToOmit.forEach(item => { | ||
delete data[item]; | ||
@@ -260,6 +260,6 @@ }); | ||
}); | ||
if (this._config.onPreToJSONSafeData) { | ||
if (typeof this._config.onPreToJSONSafeData === 'function') { | ||
data = this._config.onPreToJSONSafeData(data); | ||
} | ||
fieldsToOmit.forEach(item => { | ||
fieldsToOmit === null || fieldsToOmit === void 0 ? void 0 : fieldsToOmit.forEach(item => { | ||
delete data[item]; | ||
@@ -266,0 +266,0 @@ }); |
@@ -0,1 +1,7 @@ | ||
## 1.2.5 - Mon Mar 08 2021 22:54:45 | ||
**Contributor:** Theo Gravity | ||
- Fix bug where specifying something other than an array for toJSON/toJSONSafe throws | ||
## 1.2.4 - Mon Mar 08 2021 22:05:16 | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "new-error", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"description": "A production-grade error creation and serialization library designed for Typescript", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
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
81508
100