Skip to content

Commit

Permalink
Update _decodeComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Nov 28, 2023
1 parent 3d1c05d commit 4d3516e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/src/state/state_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,13 @@ abstract final class StateUtil {

static String _decodeComponent(String component) {
try {
if (component.codeUnits.any((e) => e > 127)) return component;
return Uri.decodeComponent(component);
// ignore: avoid_catching_errors
} on ArgumentError {
return component;
} on FormatException {
return component;
} on Object {
return component;
}
Expand Down

0 comments on commit 4d3516e

Please sign in to comment.