1
0
Fork 0

Avoid too large cert error messages

This commit is contained in:
Chocobozzz 2020-11-25 14:43:18 +01:00
parent fc41887463
commit a9d4c3c8ca
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,8 @@ function getLoggerReplacer () {
// Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value#Examples
return (key: string, value: any) => {
if (key === 'cert') return 'Replaced by the logger to avoid large log message'
if (typeof value === 'object' && value !== null) {
if (seen.has(value)) return