|
|
@@ -29,6 +29,7 @@ export function addDirective (
|
|
|
export function addHook (el: ASTElement, name: string, code: string) {
|
|
|
const hooks = el.hooks || (el.hooks = {})
|
|
|
const hook = hooks[name]
|
|
|
+ /* istanbul ignore if */
|
|
|
if (hook) {
|
|
|
hook.push(code)
|
|
|
} else {
|
|
|
@@ -50,6 +51,7 @@ export function addHandler (
|
|
|
}
|
|
|
const newHandler = { value, modifiers }
|
|
|
const handlers = events[name]
|
|
|
+ /* istanbul ignore if */
|
|
|
if (Array.isArray(handlers)) {
|
|
|
handlers.push(newHandler)
|
|
|
} else if (handlers) {
|