diff --git a/lib/web_ui/flutter_js/src/utils.js b/lib/web_ui/flutter_js/src/utils.js index ecd4c2c21b937..690783b6d9431 100644 --- a/lib/web_ui/flutter_js/src/utils.js +++ b/lib/web_ui/flutter_js/src/utils.js @@ -22,7 +22,7 @@ export function joinPathSegments(...segments) { function stripLeftSlashes(s) { let i = 0; while (i < s.length) { - if (s.charCodeAt(i) !== "/") { + if (s.charAt(i) !== "/") { break; } i++; @@ -33,7 +33,7 @@ function stripLeftSlashes(s) { function stripRightSlashes(s) { let i = s.length; while (i > 0) { - if (s.charCodeAt(i - 1) !== "/") { + if (s.charAt(i - 1) !== "/") { break; } i--;