Skip to content

Commit

Permalink
disable duplicate attribute warning in IE (close vuejs#3929)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 13, 2016
1 parent ff178cc commit 30bd34e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler/parser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function parse (
type: 1,
tag,
attrsList: attrs,
attrsMap: makeAttrsMap(attrs),
attrsMap: makeAttrsMap(attrs, options.isIE),
parent: currentParent,
children: []
}
Expand Down Expand Up @@ -429,10 +429,10 @@ function parseModifiers (name: string): Object | void {
}
}

function makeAttrsMap (attrs: Array<Object>): Object {
function makeAttrsMap (attrs: Array<Object>, isIE: ?boolean): Object {
const map = {}
for (let i = 0, l = attrs.length; i < l; i++) {
if (process.env.NODE_ENV !== 'production' && map[attrs[i].name]) {
if (process.env.NODE_ENV !== 'production' && map[attrs[i].name] && !isIE) {
warn('duplicate attribute: ' + attrs[i].name)
}
map[attrs[i].name] = attrs[i].value
Expand Down

0 comments on commit 30bd34e

Please sign in to comment.