Skip to content

Commit e302999

Browse files
authored
Use String(num) for robustness in number property JSON formatting
1 parent 10f19fa commit e302999

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/adapter/objectPreview/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ function formatPropertyPreviewAsJson(prop: Cdp.Runtime.PropertyPreview): string
606606
return JSON.stringify(prop.value ?? '');
607607
case 'number': {
608608
const num = Number(prop.value);
609-
return isFinite(num) ? (prop.value ?? 'null') : 'null';
609+
return isFinite(num) ? String(num) : 'null';
610610
}
611611
case 'boolean':
612612
return prop.value === 'true' ? 'true' : 'false';

0 commit comments

Comments
 (0)