fix(album): resolve TypeScript strict array access errors
Fix TS2345 errors where array element access (medias[i]) was inferred as `AlbumMediaItem | undefined` instead of `AlbumMediaItem`. Changes: - Add non-null assertion (!) after array access in for loops - Add explicit cast to AnyMessageContent for hasNonNullishProperty calls The non-null assertion is safe here because we iterate with `i < medias.length`, guaranteeing the index is valid. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1529,7 +1529,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
|
||||
// Send each media item sequentially
|
||||
for (let i = 0; i < medias.length; i++) {
|
||||
const media = medias[i]
|
||||
const media = medias[i]!
|
||||
|
||||
const result = await sendMediaWithRetry(media, i)
|
||||
results.push(result)
|
||||
|
||||
Reference in New Issue
Block a user