File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -309,16 +309,17 @@ function inspect(value, opts) {
309
309
if ( typeof opts === 'boolean' ) {
310
310
ctx . showHidden = opts ;
311
311
} else if ( opts ) {
312
- const optKeys = ObjectKeys ( opts ) ;
313
- for ( const key of optKeys ) {
312
+ for ( const key in opts ) {
314
313
// TODO(BridgeAR): Find a solution what to do about stylize. Either make
315
314
// this function public or add a new API with a similar or better
316
315
// functionality.
317
316
if (
318
317
ObjectPrototypeHasOwnProperty ( inspectDefaultOptions , key ) ||
319
318
key === 'stylize' ) {
320
319
ctx [ key ] = opts [ key ] ;
321
- } else if ( ctx . userOptions === undefined ) {
320
+ } else if (
321
+ ObjectPrototypeHasOwnProperty ( opts , key ) &&
322
+ ctx . userOptions === undefined ) {
322
323
// This is required to pass through the actual user input.
323
324
ctx . userOptions = opts ;
324
325
}
You can’t perform that action at this time.
0 commit comments