Skip to content

Commit 0a7ee60

Browse files
committed
fix: prevent empty path
1 parent c405e74 commit 0a7ee60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/supabase_functions/lib/supabase_functions_shelf.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class SupabaseFunctionsShelf {
3737
// Remove the first path segment, because it starts with `dart_edge/<actual-sub-path>`.
3838
var uri = Uri.parse(clone.url);
3939
uri = uri.replace(pathSegments: uri.pathSegments.skip(1));
40+
if (uri.path.isEmpty) {
41+
uri = uri.replace(path: "/");
42+
}
4043

4144
final shelfRequest = shelf.Request(
4245
clone.method,

0 commit comments

Comments
 (0)