Skip to content

Commit e85319f

Browse files
committed
fix vuejs#580 parent scope directives compiled twice
1 parent b3faa27 commit e85319f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/compile/compile.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -468,11 +468,12 @@ function collectDirectives (el, options, asParent) {
468468
attrName = attr.name
469469
if (attrName.indexOf(config.prefix) === 0) {
470470
dirName = attrName.slice(config.prefix.length)
471-
if (
472-
asParent &&
473-
(dirName === 'with' || dirName === 'ref')
474-
) {
475-
continue
471+
if (asParent) {
472+
if (dirName === 'with' || dirName === 'ref') {
473+
continue
474+
} else {
475+
el.removeAttribute(attrName)
476+
}
476477
}
477478
dirDef = options.directives[dirName]
478479
_.assertAsset(dirDef, 'directive', dirName)

0 commit comments

Comments
 (0)