File tree 2 files changed +10
-3
lines changed
frontend/src/components/Topics/Topic/Messages/MessageContent
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import React from 'react';
3
3
import * as S from './MessageContent.styled' ;
4
4
5
5
export interface AvroMetadataProps {
6
- deserializeProperties ?: { [ key : string ] : any | undefined } ;
6
+ deserializeProperties ?: { [ key : string ] : unknown | undefined } ;
7
7
}
8
8
9
9
const AvroMetadata : React . FC < AvroMetadataProps > = ( {
@@ -18,6 +18,13 @@ const AvroMetadata: React.FC<AvroMetadataProps> = ({
18
18
return null ;
19
19
}
20
20
21
+ if (
22
+ typeof deserializeProperties . name !== 'string' ||
23
+ typeof deserializeProperties . schemaId !== 'number'
24
+ ) {
25
+ return null ;
26
+ }
27
+
21
28
return (
22
29
< S . Metadata >
23
30
< S . MetadataLabel > Value Type</ S . MetadataLabel >
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ export interface MessageContentProps {
19
19
contentSize ?: number ;
20
20
keySerde ?: string ;
21
21
valueSerde ?: string ;
22
- keyDeserializeProperties ?: { [ key : string ] : any | undefined } ;
23
- valueDeserializeProperties ?: { [ key : string ] : any | undefined } ;
22
+ keyDeserializeProperties ?: { [ key : string ] : unknown | undefined } ;
23
+ valueDeserializeProperties ?: { [ key : string ] : unknown | undefined } ;
24
24
}
25
25
26
26
const MessageContent : React . FC < MessageContentProps > = ( {
You can’t perform that action at this time.
0 commit comments