A decentralized music tracking and discovery platform built on AT Protocol 🎵 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz

Add optional chaining to avatar checks

+4 -4
+2 -2
apps/web/src/components/Handle/Handle.tsx
··· 176 176 <div className="flex flex-row items-start justify-between"> 177 177 <div className="flex flex-row items-center"> 178 178 <Link to={link} className="no-underline"> 179 - {!profiles[did]?.avatar.endsWith("/@jpeg") && ( 179 + {!profiles[did]?.avatar?.endsWith("/@jpeg") && ( 180 180 <Avatar 181 181 src={profiles[did]?.avatar} 182 182 name={profiles[did]?.displayName} 183 183 size={"60px"} 184 184 /> 185 185 )} 186 - {profiles[did]?.avatar.endsWith("/@jpeg") && ( 186 + {profiles[did]?.avatar?.endsWith("/@jpeg") && ( 187 187 <div className="w-[60px] h-[60px] rounded-full bg-[var(--color-avatar-background)] flex items-center justify-center"> 188 188 <IconUser size={30} color="#fff" /> 189 189 </div>
+2 -2
apps/web/src/pages/home/feed/Feed.tsx
··· 220 220 221 221 <div className="flex"> 222 222 <div className="mr-[8px]"> 223 - {!song.userAvatar.endsWith("/@jpeg") && ( 223 + {!song.userAvatar?.endsWith("/@jpeg") && ( 224 224 <Avatar 225 225 src={song.userAvatar} 226 226 name={song.userDisplayName} 227 227 size={"20px"} 228 228 /> 229 229 )} 230 - {song.userAvatar.endsWith("/@jpeg") && ( 230 + {song.userAvatar?.endsWith("/@jpeg") && ( 231 231 <div className="w-[20px] h-[20px] rounded-full bg-[var(--color-avatar-background)] flex items-center justify-center"> 232 232 <IconUser size={10} color="#fff" /> 233 233 </div>