From ff178ccc7eb9a00958240059078c7651359fce3d Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 13 Oct 2016 03:18:21 -0400 Subject: [PATCH] fix directive rawName generation for raw render functions (fix #3930) --- src/core/vdom/modules/directives.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/core/vdom/modules/directives.js b/src/core/vdom/modules/directives.js index f5f92f3d..230bbeba 100644 --- a/src/core/vdom/modules/directives.js +++ b/src/core/vdom/modules/directives.js @@ -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) {