Skip to content

Commit 9e9bb6b

Browse files
fix: Mic access crash issue (#951)
1 parent 6d2bf33 commit 9e9bb6b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/screens/chat-screen/components/audio-recorder/AudioRecorder.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,12 @@ export const AudioRecorder = ({
113113
setIsAudioRecording(true);
114114
}
115115
})
116-
.catch(e => {
117-
Alert.alert(e);
116+
.catch(error => {
117+
.catch(error => {
118+
Alert.alert(
119+
'Error preparing audio file',
120+
error instanceof Error ? error.message : String(error),
121+
);
118122
deleteRecorder();
119123
});
120124
};

0 commit comments

Comments
 (0)