Skip to content

Commit 07ed46c

Browse files
committed
fix(ExpoSpeechService.kt): reorder conditions in resolveSourceUri
1 parent 8a60f33 commit 07ed46c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

android/src/main/java/expo/modules/speechrecognition/ExpoSpeechService.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,11 @@ class ExpoSpeechService(
433433
*/
434434
private fun resolveSourceUri(sourceUri: String): File =
435435
when {
436-
// Local file path without URI scheme
437-
!sourceUri.startsWith("https://") && !sourceUri.startsWith("file://") -> File(sourceUri)
438-
439436
// File URI
440437
sourceUri.startsWith("file://") -> File(URI(sourceUri))
438+
439+
// Local file path without URI scheme
440+
!sourceUri.startsWith("https://") -> File(sourceUri)
441441

442442
// HTTP URI - throw an error
443443
else -> {

0 commit comments

Comments
 (0)