From 57642fac8f33b9ea530cc997f8f7465a0573e123 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 24 Aug 2020 17:24:54 -0400 Subject: [PATCH] fix(ssr): invoke directive created hook during hydration --- packages/runtime-core/src/hydration.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index aa92891d4b2..c2d13a1986d 100644 --- a/packages/runtime-core/src/hydration.ts +++ b/packages/runtime-core/src/hydration.ts @@ -244,6 +244,9 @@ export function createHydrationFunctions( const { props, patchFlag, shapeFlag, dirs } = vnode // skip props & children if this is hoisted static nodes if (patchFlag !== PatchFlags.HOISTED) { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, 'created') + } // props if (props) { if (