Parcourir la source

Fix modifiers being incorrectly passed to terminal directives (fix #2707)

- Fixes #2707
- Terminal directives where incorrectly revieving modifiers from other inline directives
Blake Newman il y a 10 ans
Parent
commit
050abf2b37
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/compiler/compile.js

+ 1 - 1
src/compiler/compile.js

@@ -588,7 +588,6 @@ function checkTerminalDirectives (el, attrs, options) {
   var attr, name, value, modifiers, matched, dirName, rawName, arg, def, termDef
   for (var i = 0, j = attrs.length; i < j; i++) {
     attr = attrs[i]
-    modifiers = parseModifiers(attr.name)
     name = attr.name.replace(modifierRE, '')
     if ((matched = name.match(dirAttrRE))) {
       def = resolveAsset(options, 'directives', matched[1])
@@ -596,6 +595,7 @@ function checkTerminalDirectives (el, attrs, options) {
         if (!termDef || ((def.priority || DEFAULT_TERMINAL_PRIORITY) > termDef.priority)) {
           termDef = def
           rawName = attr.name
+          modifiers = parseModifiers(attr.name)
           value = attr.value
           dirName = matched[1]
           arg = matched[2]