@sendgrid/helpers
Advanced tools
Comparing version 6.1.5 to 6.2.0
@@ -45,3 +45,3 @@ 'use strict'; | ||
let err = chalk.red(`${this.message} (${this.code})`); | ||
if (Array.isArray(body.errors)) { | ||
if (body && Array.isArray(body.errors)) { | ||
body.errors.forEach(error => { | ||
@@ -48,0 +48,0 @@ const message = chalk.yellow(error.message); |
@@ -8,6 +8,4 @@ 'use strict'; | ||
return arr.map(item => { | ||
if (typeof item === 'object' && item !== null) { | ||
if (typeof item.toJSON === 'function') { | ||
return item.toJSON(); | ||
} | ||
if (typeof item === 'object' && item !== null && typeof item.toJSON === 'function') { | ||
return item.toJSON(); | ||
} | ||
@@ -14,0 +12,0 @@ return item; |
{ | ||
"name": "@sendgrid/helpers", | ||
"description": "SendGrid NodeJS internal helpers", | ||
"version": "6.1.5", | ||
"version": "6.2.0", | ||
"author": "SendGrid <dx@sendgrid.com> (sendgrid.com)", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
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
100978
69
3383