Skip to content

Commit 1d43db9

Browse files
committed
terminal directives should have higher priority than element directives (fix #987)
1 parent bd9015b commit 1d43db9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/compiler/compile.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,16 @@ function compileNode (node, options) {
236236
*/
237237

238238
function compileElement (el, options) {
239+
var linkFn
239240
var hasAttrs = el.hasAttributes()
240-
// check element directives
241-
var linkFn = checkElementDirectives(el, options)
242241
// check terminal directives (repeat & if)
243-
if (!linkFn && hasAttrs) {
242+
if (hasAttrs) {
244243
linkFn = checkTerminalDirectives(el, options)
245244
}
245+
// check element directives
246+
if (!linkFn) {
247+
linkFn = checkElementDirectives(el, options)
248+
}
246249
// check component
247250
if (!linkFn) {
248251
linkFn = checkComponent(el, options, hasAttrs)

0 commit comments

Comments
 (0)