File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ function Component ({ className = '' }: Props): React.ReactElement<Props> {
105105 if ( nftItem . description && isValidJson ( nftItem . description ) ) {
106106 const ordinalNftItem = JSON . parse ( nftItem . description ) as OrdinalRemarkData ;
107107
108- if ( 'p' in ordinalNftItem && 'op' in ordinalNftItem && 'tick' in ordinalNftItem && 'amt' in ordinalNftItem ) {
108+ if ( typeof ordinalNftItem === 'object' && 'p' in ordinalNftItem && 'op' in ordinalNftItem && 'tick' in ordinalNftItem && 'amt' in ordinalNftItem ) {
109109 return (
110110 < InscriptionGalleryWrapper
111111 handleOnClick = { handleOnClickNft }
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ function Component ({ className = '' }: Props): React.ReactElement<Props> {
139139 const show3DModel = SHOW_3D_MODELS_CHAIN . includes ( nftItem . chain ) ;
140140 const ordinalNftItem = nftItem . description && isValidJson ( nftItem . description ) && JSON . parse ( nftItem . description ) as OrdinalRemarkData ;
141141 const isBRC20Inscription = useMemo ( ( ) => {
142- if ( ordinalNftItem && 'p' in ordinalNftItem && 'op' in ordinalNftItem && 'tick' in ordinalNftItem && 'amt' in ordinalNftItem ) {
142+ if ( typeof ordinalNftItem === 'object' && 'p' in ordinalNftItem && 'op' in ordinalNftItem && 'tick' in ordinalNftItem && 'amt' in ordinalNftItem ) {
143143 return true ;
144144 }
145145
You can’t perform that action at this time.
0 commit comments