File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed
developer-extension/src/panel/components Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -130,21 +130,15 @@ function isFunctionMetadata(value: unknown): value is FunctionMetadata {
130130 )
131131}
132132
133- function JsonFunctionValue ( {
134- descriptor,
135- metadata,
136- } : {
137- descriptor : JsonValueDescriptor
138- metadata : FunctionMetadata
139- } ) {
133+ function JsonFunctionValue ( { descriptor, metadata } : { descriptor : JsonValueDescriptor ; metadata : FunctionMetadata } ) {
140134 const [ showSource , setShowSource ] = useState ( false )
141135 const colorScheme = useColorScheme ( )
142136 const { sdkType } = useContext ( JsonContext ) !
143137
144138 const handleRevealLocation = ( ) => {
145139 const path = descriptor . path
146140 const logExpression = buildLogExpression ( path , sdkType )
147-
141+
148142 if ( logExpression ) {
149143 evalInWindow ( logExpression ) . catch ( ( error ) => {
150144 logger . error ( 'Failed to log function:' , error )
@@ -155,9 +149,7 @@ function JsonFunctionValue({
155149 return (
156150 < JsonLine descriptor = { descriptor } >
157151 < JsonText color = "grape" descriptor = { descriptor } >
158- < Text component = "span" >
159- { `<function: ${ metadata . __name } >` }
160- </ Text >
152+ < Text component = "span" > { `<function: ${ metadata . __name } >` } </ Text >
161153 </ JsonText >
162154 { metadata . __source && (
163155 < >
Original file line number Diff line number Diff line change @@ -288,13 +288,7 @@ function serializeJson(value: object) {
288288 // replacer to remove function attributes that have been serialized with metadata by useSdkInfos() (ex: beforeSend)
289289 const replacer = ( key : string , val : unknown ) => {
290290 // Filter out function metadata objects
291- if (
292- key !== '' &&
293- ! Array . isArray ( val ) &&
294- typeof val === 'object' &&
295- val &&
296- ( val as any ) . __type === 'function'
297- ) {
291+ if ( key !== '' && ! Array . isArray ( val ) && typeof val === 'object' && val && ( val as any ) . __type === 'function' ) {
298292 return undefined
299293 }
300294 return val
You can’t perform that action at this time.
0 commit comments