From 593a9d0da5f85e9bd02997cafbda13fa08f7c2cc Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 11 Jun 2024 12:08:22 -0700 Subject: [PATCH] Fix character getter API usage in stripLeftSlashes/stripRightSlashes (flutter/engine#53299) --- engine/src/flutter/lib/web_ui/flutter_js/src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/lib/web_ui/flutter_js/src/utils.js b/engine/src/flutter/lib/web_ui/flutter_js/src/utils.js index ecd4c2c21b9..690783b6d94 100644 --- a/engine/src/flutter/lib/web_ui/flutter_js/src/utils.js +++ b/engine/src/flutter/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--;