{"record":{"id":"f4d2cc6d6e73ed2e","repo":"Meituan-Dianping/mpvue","slug":"duplicate-attribute-attrs-i-name-f4d2cc","errorCode":null,"errorMessage":"duplicate attribute: ${attrs[i].name}","messagePattern":"duplicate attribute: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/compiler/parser/index.js","lineNumber":554,"sourceCode":"}\n\nfunction parseModifiers (name: string): Object | void {\n  const match = name.match(modifierRE)\n  if (match) {\n    const ret = {}\n    match.forEach(m => { ret[m.slice(1)] = true })\n    return ret\n  }\n}\n\nfunction makeAttrsMap (attrs: Array<Object>): Object {\n  const map = {}\n  for (let i = 0, l = attrs.length; i < l; i++) {\n    if (\n      process.env.NODE_ENV !== 'production' &&\n      map[attrs[i].name] && !isIE && !isEdge\n    ) {\n      warn('duplicate attribute: ' + attrs[i].name)\n    }\n    map[attrs[i].name] = attrs[i].value\n  }\n  return map\n}\n\n// for script (e.g. type=\"x/template\") or style, do not decode content\nfunction isTextTag (el): boolean {\n  return el.tag === 'script' || el.tag === 'style'\n}\n\nfunction isForbiddenTag (el): boolean {\n  return (\n    el.tag === 'style' ||\n    (el.tag === 'script' && (\n      !el.attrsMap.type ||\n      el.attrsMap.type === 'text/javascript'\n    ))","sourceCodeStart":536,"sourceCodeEnd":572,"githubUrl":"https://github.com/Meituan-Dianping/mpvue/blob/6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b/src/compiler/parser/index.js#L536-L572","documentation":"Dev-only warning from makeAttrsMap during template parsing: the same attribute name appears more than once on a single element (IE/Edge parsing artifacts are exempted). The later value overwrites the earlier in the attribute map, so the warning flags markup whose behavior likely differs from author intent.","triggerScenarios":"Thrown at src/compiler/parser/index.js:554 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Deduplicate the attribute on the element named in the warning","Merge values into one attribute (e.g. combine classes)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c5d78ee04f58c6d782c456dfcf0fe63c0b7f89b","analyzedAt":"2026-09-02T05:17:40.946Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T11:17:12.671Z"}