We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cda077c commit 7d008f7Copy full SHA for 7d008f7
packages/shell-api/src/deep-inspect-service-provider-wrapper.ts
@@ -234,12 +234,9 @@ function customDocumentInspect(
234
};
235
236
// reuse the standard inpect logic for an object without causing infinite
237
- // recursion
238
- const inspectBackup = (this as any)[customInspectSymbol];
239
- delete (this as any)[customInspectSymbol];
240
- const result = inspect(this, newInspectOptions);
241
- (this as any)[customInspectSymbol] = inspectBackup;
242
- return result;
+ const copyToInspect: any = Array.isArray(this) ? this.slice() : { ...this };
+ delete copyToInspect[customInspectSymbol];
+ return inspect(copyToInspect, newInspectOptions);
243
}
244
245
function addCustomInspect(obj: any) {
0 commit comments