Skip to content

Commit

Permalink
fix: issue Flutterando#941
Browse files Browse the repository at this point in the history
  • Loading branch information
camrongiuliani committed Feb 26, 2024
1 parent edc1919 commit 46d8777
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ import 'url_service.dart';

class WebUrlService extends UrlService {
@override
String? getPath() => resolvePath(window.location.href);
String? getPath() {
final href = window.location.href;

if (href.contains('#')) {
return href.split('#').last;
}

return '/';
}
}

UrlService create() {
Expand Down

0 comments on commit 46d8777

Please sign in to comment.