File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 77 * @flow
88 */
99
10- export function getIODescription ( value : any ) : string {
10+ export function getIODescription ( value : mixed ) : string {
1111 if ( ! __DEV__ ) {
1212 return '' ;
1313 }
@@ -34,11 +34,13 @@ export function getIODescription(value: any): string {
3434 return value . command ;
3535 } else if (
3636 typeof value . request === 'object' &&
37+ value . request !== null &&
3738 typeof value . request . url === 'string'
3839 ) {
3940 return value . request . url ;
4041 } else if (
4142 typeof value . response === 'object' &&
43+ value . response !== null &&
4244 typeof value . response . url === 'string'
4345 ) {
4446 return value . response . url ;
@@ -53,7 +55,11 @@ export function getIODescription(value: any): string {
5355 return value . name ;
5456 } else {
5557 const str = value . toString ( ) ;
56- if ( str . startWith ( '[object ' ) || str . length < 5 || str . length > 500 ) {
58+ if (
59+ str . startsWith ( '[object ' ) ||
60+ str . length < 5 ||
61+ str . length > 500
62+ ) {
5763 // This is probably not a useful description.
5864 return '' ;
5965 }
You can’t perform that action at this time.
0 commit comments