diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart index 011e45e913c..4b21b3d90ce 100644 --- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart +++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart @@ -1036,7 +1036,8 @@ class Primitives { } static String flattenString(String str) { - return JS('String', "#.charCodeAt(0) == 0 ? # : #", str, str, str); + return JS('returns:String;depends:none;effects:none;throws:never;gvn:true', + "#.charCodeAt(0) == 0 ? # : #", str, str, str); } static String getTimeZoneName(DateTime receiver) {