refactor: use Object.keys() instead of for...in in matchAttributes

Co-authored-by: gaomeng1900 <10131203+gaomeng1900@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-09 14:32:20 +00:00
parent 5988d4ba24
commit d46a57f8ef

View File

@@ -88,7 +88,7 @@ function matchAttributes(
for (const pattern of patterns) {
if (pattern.includes('*')) {
const regex = globToRegex(pattern)
for (const key in attrs) {
for (const key of Object.keys(attrs)) {
if (regex.test(key) && attrs[key].trim()) {
result[key] = attrs[key].trim()
}