From 7ce7569da9aa96670313d4c1d722d70cf9524684 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 27 Jun 2026 12:07:16 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Optimize=20ManifestParser=20attribu?= =?UTF-8?q?te=20collapsing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: sunnylqm <615282+sunnylqm@users.noreply.github.com> --- src/utils/app-info-parser/xml-parser/manifest.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/utils/app-info-parser/xml-parser/manifest.ts b/src/utils/app-info-parser/xml-parser/manifest.ts index bbb4ae7..a2cc2a4 100644 --- a/src/utils/app-info-parser/xml-parser/manifest.ts +++ b/src/utils/app-info-parser/xml-parser/manifest.ts @@ -15,9 +15,12 @@ export class ManifestParser { private collapseAttributes(element: any) { const collapsed: Record = Object.create(null); - for (const attr of Array.from( - element.attributes as Array<{ name: string; typedValue: { value: any } }>, - )) { + const attributes = element.attributes as Array<{ + name: string; + typedValue: { value: any }; + }>; + for (let i = 0, len = attributes.length; i < len; i++) { + const attr = attributes[i]; collapsed[attr.name] = attr.typedValue.value; } return collapsed;