File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -179,12 +179,15 @@ export class Checker {
179179 return '(number)'
180180 }
181181
182- const process = ( obj : any ) : any => {
182+ const process = ( obj : any , depth : number ) : any => {
183+ if ( depth <= 0 ) {
184+ return obj
185+ }
183186 if ( obj == null ) {
184187 return obj
185188 }
186189 if ( Array . isArray ( obj ) ) {
187- return obj . map ( process )
190+ return obj . map ( ( x ) => process ( x , depth - 1 ) )
188191 }
189192 if ( redactNumber && typeof obj === 'number' ) {
190193 return processNumber ( obj )
@@ -223,14 +226,14 @@ export class Checker {
223226 if ( this . #redactOptions?. redactKeys ?. test ( k ) ) {
224227 return [ k , '(redacted)' ]
225228 }
226- return [ k , process ( v ) ]
229+ return [ k , process ( v , depth - 1 ) ]
227230 } ) ,
228231 )
229232 }
230233 return obj
231234 }
232235
233- return process ( value )
236+ return process ( value , 50 )
234237 }
235238
236239 /**
You can’t perform that action at this time.
0 commit comments