Skip to content

Commit

Permalink
add typecheck (#2317)
Browse files Browse the repository at this point in the history
  • Loading branch information
ratik21 authored Oct 3, 2024
1 parent 7bc49fd commit 46c7976
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/chat/matrix/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export async function encryptFile(file: File): Promise<{ info: encrypt.IEncrypte
}

export function isFileUploadedToMatrix(url: string): boolean {
if (!url) return false;
if (!url || typeof url !== 'string') return false;

return url.includes('_matrix/client/v1/media');
}
Expand Down

0 comments on commit 46c7976

Please sign in to comment.