8000 fix #2366 custom terminal directive with global mixin · lrenc/vue@97b82f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 97b82f8

Browse files
committed
fix vuejs#2366 custom terminal directive with global mixin
1 parent f5a63b4 commit 97b82f8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/compiler/compile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,8 @@ function makeTerminalNodeLinkFn (el, dirName, value, options, def) {
627627
filters: parsed.filters,
628628
raw: value,
629629
// either an element directive, or if/for
630-
def: def || publicDirectives[dirName]
630+
// #2366 or custom terminal directive
631+
def: def || resolveAsset(options, 'directives', dirName)
631632
}
632633
// check ref for v-for and router-view
633634
if (dirName === 'for' || dirName === 'router-view') {

test/unit/specs/compiler/compile_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ describe('Compile', function () {
636636
})
637637

638638
it('allow custom terminal directive', function () {
639-
Vue.mixin({})
639+
Vue.mixin({}) // #2366 conflict with custom terminal directive
640640
Vue.compiler.terminalDirectives.push('foo')
641641
Vue.directive('foo', {})
642642

0 commit comments

Comments
 (0)
0