Skip to content

Commit

Permalink
fix directive rawName generation for raw render functions (fix vuejs#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 13, 2016
1 parent 8823fcc commit ff178cc
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/core/vdom/modules/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,17 @@ function normalizeDirectives (
let i, dir
for (i = 0; i < dirs.length; i++) {
dir = dirs[i]
res[getRawDirName(dir)] = dir
if (!dir.modifiers) {
dir.modifiers = emptyModifiers
}
res[getRawDirName(dir)] = dir
dir.def = resolveAsset(vm.$options, 'directives', dir.name, true)
}
return res
}

function getRawDirName (dir: VNodeDirective): string {
return dir.rawName || (
dir.name + (
dir.modifiers
? '.' + Object.keys(dir.modifiers).join('.')
: ''
)
)
return dir.rawName || `${dir.name}.${Object.keys(dir.modifiers || {}).join('.')}`
}

function callHook (dir, hook, vnode, oldVnode) {
Expand Down

0 comments on commit ff178cc

Please sign in to comment.