From: Evan You Date: Mon, 24 Aug 2020 21:24:54 +0000 (-0400) Subject: fix(ssr): invoke directive created hook during hydration X-Git-Tag: v3.0.0-rc.8~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57642fac8f33b9ea530cc997f8f7465a0573e123;p=thirdparty%2Fvuejs%2Fcore.git fix(ssr): invoke directive created hook during hydration --- diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index aa92891d4b..c2d13a1986 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 (